wen

where did my linux 'eth0' go?

Discussion created by wen Employee on Dec 10, 2013

Ever run into an issue where you have cloned/copied your linux (Red Hat/CentOS) VM in vCenter and upon booting, eth0 is no longer configured?  If you run "#service network restart", you get the error message "Device eth0 does not seem to be present".  Here's a quick fix - after you answered 'copied/moved this VM" during power on in vCenter Server, a new MAC is generated for the VM.  As a result, linux OS is 'fooled' to think a new NIC has been added given its new MAC address.  In an effort to remember the old NIC, a new NIC gets added to the OS and you can see this reflected in the etc/udev/rules.d/70-persistent-net.rule file...if you have only one NIC in the past (eth0 for example), you'd likely see an entry for "eth1", with a HW MAC address matching the one you see in vCenter

linuxeth0.PNG.png

To get eth0 working and tell Linux to forget the original eth0 - simply comment out the line representing "eth0" or delete it, then replace "eth1" with "eth0" (your file should look like the one below):

 

updatedlinux.PNG.png

 

After you get done modifying the rule file, you need to update the /etc/sysconfig/network-scripts/ifcfg-eth0 file and replace the old MAC with the new one found in vCenter for the VM.  When that is finished, simply reload udev and restart network service and eth0 should be back and happy!

 

#start_udev

#service network restart

Outcomes