A fix for the udev eth1 issue, take back your eth0.

Latest response

I don't know if this has been stated before (I searched => nothing)

I have been working on fixing the dreaded udev eth1 issue, and after some thought and discussion with my team we figured out how to circumvent udev to give us eth0 on clones of vm's. I have searched high and low to see if there was a way to fix this issue (google => no, startup/shutdown script => no) so I finally stopped thinking like an administrator and looked at the problem differently. The problem was not with the cloned machines but with the template itself.

My solution:

To fix the problem all you have to do is "change the template's network interface"

In my case, I changed the interface on the template to eth5 (because we won't have more than 4 interfaces on the system)

How to change:

modify your /etc/sysconfig/network-scripts/ifcfg-eth0 file to /etc/sysconfig/network-scritps/ifcfg-eth5 (or whatever number you want, just not eth0)
make sure you change the contents of the ifcfg-eth5 file to reflect eth5
then modify you /etc/udev/rules.d/70-persistent-net.rules file to reflect that you now what to rename the interface that has the HW address to eth5
reboot your template and when it comes back up you should see that the interface is now eth5.
You are now ready to clone vm's while they are up or down, doesn't matter your interface on the cloned server will come back as eth0

Responses