Device eth0 does not seem to be present

After cloning a Centos machine from Oracle Virtualbox or from VMware template, I got following error message when networking service was restarted
device eth0 does not seem to be present
Initially, I thought the issue might be with the network adapter but was not sure exactly which network adapter settings should be kept..
On further investigation, I came with a solution with following solution.
Basically, the problem occurs due to old NIC record does not getting erased even though new NIC record is assigned.
1) Open following file which holds record of the NIC templates
vi /etc/udev/rules.d/70-persistent-net.rules
The above file should contain similar records as below:
# PCI device 0x15ad:0x07b0 (e1000)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”,
ATTR{address}==”00:27:3e:ae:00:1a”,
ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x15ad:0x07b0 (e1000)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”,
ATTR{address}==”00:27:3e:ae:00:1b”,
ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
2) Remove previous eth entries and change the last entry NAME to eth0
# PCI device 0x15ad:0x07b0 (e1000)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”,
ATTR{address}==”00:27:3e:ae:00:1b”,
ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
3) Save the file.
4) Open following file and modify the mac address

vi /etc/sysconfig/network-scripts/ifcfg-eth0
5) Save the file.
6) Reload udev configuration for the changes we made to reflect
start_udev
7) Restart network service
service network restart
or
/etc/init.d/network restart
8) Check the available ip using ifconfig command and update /etc/resolv.conf file with correct nameservers.

 

Leave a comment