Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an image with a debian-squeeze installation and using that I created two overlay-images to boot two (nearly identical) virtual machines from.

When I boot them up individually (connecting them to a vde-switch and specifying the mac-adress in the qemu/kvm command-line) everything works as I would expect.

However when I run them simultaniously something odd is happening:

The first machine to boot works as expected and creates a "eth0"-interface, but the second machine does not create "eth0" but "eth1" instead.

Can someone please explain this behaviour?

What would be the best way to ensure that in all vms the virtual network interface has the same name?

Many thanks!

share|improve this question
add comment

2 Answers

Most Linux systems use udev to tie an interface name to a specific MAC addresses (so that machines with multiple NICs have the interfaces consistently named across boots). This however causes this problem when the MAC address does change (like when booting in a VM with a different MAC address set) but you don't want a new interface name assigned. To clear these mappings, delete the appropriate file in /etc/udev/rules.d/ (usually named 70-persistent-net.rules) and reboot. In your case you want to do this while creating the master image.

share|improve this answer
add comment

Are they starting on the same machine? How are they communicating to the outside world? Are u using any bridge interface like br0 on the host machine? Can you paste the qemu command that u sed to start both vms.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.