Have you ever experience an issue “Device eth0 does not seem to be present” after moving a clonned Centos virtual machine through VSphere?
Your issue is likely when moving one Virtual Machine to another host where this machine is unable to find the same network label.
When you power on virtual machine it encounters the error “Device eth0 does not seem to be present”.
The problem arises when CentOS/RHEL tries to remember the previous NIC of the virtual machine,But in case of moving or cloning VSphere changes the MAC address.

Fortunately for you, the fix could be very simple.

adminz@adminz-desktop:~$ cd /etc/udev/rules.d
adminz@adminz-desktop:~$ cp 70-persistent-net.rules /root/
adminz@adminz-desktop:~$ rm 70-persistent-net.rules
adminz@adminz-desktop:~$ reboot

This file was automatically generated by the /lib/udev/write_net_rules program, run by the persistent-net-generator.rules rules file.
Simple delete it and reboot the system to recreate the same. This should fix the problem:
Then You need to remove the MAC address in /etc/sysconfig/networking-scripts/ifcfg-eth*. To find out current MAC address
Coppy the ATTR{address} from the file and add it as “HWADDR” in /etc/sysconfig/network-scripts/ifcfg-eth0

Change the HWADDR entry with the MAC address (ATTR{address}) with the one in Subsystem udev rules file.
You may also confirm the MAC address in the Edit virtual machine settings, network cards in VCenter

After completing this now we need to reload udev configuration to reflect the changes:

Now restart network services:

adminz@adminz-desktop:~$ service network restart

Yhat fixes the issue:)

Leave a Reply

Your email address will not be published. Required fields are marked *