CentOSLinuxOperating SystemsRedHat

[Solved] Device eth0 does not seem to be present

After cloning a CentOS machine from Oracle Virtualbox or from VMware template and generating new MAC address, I received following error message wile starting networking service.

Device eth0 does not seem to be present, delaying initialisation

Initially, I thought the issue might be with the network adapter but was not sure exactly which network adapter settings should be kept or changed.On further investigation and searching the error on world wide web, I came with following solution.

Basically, the problem occurs due to old NIC record which does not get erased even though new NIC record is assigned. In short when you import a cloned virtual machine, you have to generate a new MAC address. This is important to avoid network issues when the original and cloned virtual machine are on line at a same time.

Steps to resolve the error

1) Open following file which holds record of 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, change the last entry name from eth1 to eth0 and save the file.

# 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) Open following file, modify the MAC address and save the file.

vi /etc/sysconfig/network-scripts/ifcfg-eth0

4) Reload udev configuration for the changes that we made to reflect.

start_udev

5) Update /etc/resolv.conf file with correct name-servers.

6) Restart network service.

service network restart

or

/etc/init.d/network restart

That's it !

Abhijit Sandhan

Love to Automate, Blog, Travel, Hike & spread Knowledge!

Related Articles

3 Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button