device eth0 does not seem to be present [Solved]

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

1
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

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

5) Save the file.

6) Reload udev configuration for the changes we made to reflect

1
start_udev

7) Restart network service

1
service network restart

or

1
/etc/init.d/network restart

8) Check the available ip using ifconfig command and update /etc/resolv.conf file with correct nameservers.

That's it !


Share on Facebook0Share on Google+4Tweet about this on Twitter0Share on StumbleUpon0Share on LinkedIn0Share on TumblrDigg thisPin on Pinterest0Share on Reddit0Email this to someonePrint this page
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 ...

Review Overview

User Rating: 4.95 ( 2 votes)
0

About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing the knowledge!

3 comments

  1. Thanx a lot! Everything works as described.

  2. Brilliant! Made my day after trying for more than an hour to change the network settings....

  3. Abhijit Sandhan

    Thanks for the comments guys!

Leave a Reply

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

*

CAPTCHA Image

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>