I have a few KVM machines that I put under a private network using tap devices. I have also setup their /etc/network/interfaces so that each one gets proper ip address.

I copied my setup to another machine and I see that when KVM VM's are brought up, the virtual interfaces get different names than the orginal setup. Thus /etc/network/interfaces does not work.

I tried to set virtual interface name using "name" attribute of the "-net nic" option. But that did not work.

Does anyone know how to fix this problem?


How did you set up the virtual machines in the new KVM server?

example: When you clone a virtual machine, KVM will generate new MAC ADDRESS for the interfaces... Since the MAC ADDRESS is not the same, the interfaces will have new names, because the interfaces files from the previous configuration are there, so, eth0 will not appear thus creating eth1 - At least this is how Red Hat like distros will behave..

Since you don't say what distro are you using, maybe checking the virtual machines MAC ADDRESS and change /etc/network/interfaces accordingly may help you..

  • Very good point. I am using Debian in the host and Ubuntu on the VMs. – Methos Sep 12 '11 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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