How to solve “Device eth0 does not seem to be present, delaying initialization” error

Today, I encountered with a strange error after I cloned CentOS 6 guest machine in Oracle VirtualBox. After logging in to CentOS guest, my network card is disappeared. I can’t SSH to the CentOS guest anymore.

I tried to check the IP address using command:

ifconfig

Sample output:

lo Link encap:Local Loopback 
 inet addr:127.0.0.1 Mask:255.0.0.0
 inet6 addr: ::1/128 Scope:Host
 UP LOOPBACK RUNNING MTU:65536 Metric:1
 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:0 
 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth0 config details doesn’t show up. It only displays the loopback interface details.

I tried to restart the network service to sort out the issue.

service network restart

Nothing! It simply displayed the following error.

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization

centos-6-8-minimal-running-oracle-vm-virtualbox_012

I thought that there might be any misconfiguration in network configuration file. So, I decided to dig into the eth0 configuration file to make sure if everything is correct.

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

Sample output:

DEVICE=eth0
BOOTPROTO=none
DEVICE=eth0
GATEWAY=192.168.1.1
HWADDR=08:00:27:DC:33:3F
IPADDR=192.168.1.150
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

centos-6-8-minimal-running-oracle-vm-virtualbox_013

Everything was perfect.

Again, I tried to wake up Network card using command:

ifup eth0

But, still no luck! It keeps showing the same error message as below.

Device eth0 does not seem to be present, delaying initialisation

centos-6-8-minimal-running-oracle-vm-virtualbox_014

I added and configured an additional virtual network interface card. I restarted network service and CentOS guest several times. But, nothing helped. I keep getting the same error over and over.

After a bit searching over the Internet, I found the solution. MAC address was the problem! After cloned, CentOS guest was still using the old machine’s MAC address in the Virtual machine settings.

If you ever faced the same issue, you fix it as described in the following two methods.

Method 1:

To fix this problem, simply remove the file /etc/udev/rules.d/70-persistant-net.rules and reboot your system.

rm /etc/udev/rules.d/70-persistant-net.rules

Now, you will see the network card is up.

Method 2:

If the problem is still not solved, open up the eth0 config file:

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

Note down the MAC id (HWADDR).

[...]
HWADDR=08:00:27:DC:33:3F
[...]

centos-6-8-minimal-running-oracle-vm-virtualbox_017

Close the file. Then, power off the CentOS guest and go to Settings –> Network–> Adapter 1 –> Advanced from VirtualBox menu bar.

Replace the old MAC id and update it with new one.

centos-6-8-minimal-settings_018

After changing the MAC address, Click OK to save it. and power on your guest.

Now, Check if the network card is up using command:

ifconfig

centos-6-8-minimal-running-oracle-vm-virtualbox_019

That’s it. It works.

Cheers!

Reference link:

Thanks for stopping by!

How can I benefit from this blog:

Have a Good day!!

You may also like...