Fix eth0 network interface when cloning Linux virtual machines using Oracle VirtualBox or VMWare


#ifup eth0
Device eth0 does not seem to be present, delaying initialisation
What’s happening here is that when you clone your VM, VirtualBox and VMWare apply a new MAC Address to your network interfaces but they don’t update the linux configuration files to mirror these changes and so the kernel doesn’t firstly can’t find or start the interface that matches it’s configuration (with the old MAC Address) and it finds a new interface (the new MAC Address) that it has no configuration information for. The result is that only your networking service can only start the loopback networking interface and eth0 is dead.

So here’s how we fix it:

Remove the kernel’s networking interface rules file so that it can be regenerated
# rm /etc/udev/rules.d/70-persistent-net.rules
Restart the VM
# reboot

Edit the network card "name" from eth1 to eth0 in 70-persistent-net.rules

#vi /etc/udev/rules.d/70-persistent-net.rules

Restart UDEV

#start_udev

UPDATE your interface configuration file
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Remove the MACADDR entry

Remove the UUID entry

Save and exit the file

Restart the networking service
# service network restart

 

SOURCE:

http://blog.williamjamieson.me/2012/09/21/fix-eth0-network-interface-when-cloning-redhat-centos-or-scientific-virtual-machines-using-oracle-virtualbox-or-vmware/



Article ID: 129
Created: May 28, 2014
Last Updated: May 28, 2014
Author: Natural Networks NOC [support@naturalnetworks.com]

Online URL: https://kb.naturalnetworks.com/article.php?id=129