Friday, December 28, 2012

Device eth0 does not seem to be present after copy centos vm

I copy a centos 6.3 vm to other host machine. I open it to vware workstation 9 and eth0 and eth1 devices was not up because vmware gives new mac addresses to network adapters.
ifup eth0 returns "Device eth0 does not seem to be present". Same problem for eth1 device

udev have assigned new devices eth2 and eth3 for network adapters because of the new mac addresses it seems.
needs to be removed and restart the centos guest machine.
File will be generated again after restart.

I also remove the HWADDR setting from both
/etc/sysconfig/network-scipts/ifcfg-eth0 and ifcfg-eth1.
If you don't want to remove the mac addresses you need to update it with the new ones. You can find the new ones in the advanced settings of the network adapter in edit virtual machine settings.

Its also possible to fix it the other way around. Delete the new lines (for eth2 and eth3) at 70-persistent-net.rules file and then update virtual machine settings with the mac addresses (eth0, eth1) from that file. Be aware that if you run the old and new vm's in the same lan, mac addresses have to be unique for each network adapter so its better to keep the new ones.

1 comment: