Sunday, September 29, 2013

Device eth0 Doesn't Seem to be Present, Delaying Initialization

One of the most common problem that we face for a new installed or replaced NIC card is "device eth0 does not seem to be present, delaying initialization". You may also face this problem is you copy/move a VMware guest OS from one server to another.

Problem: device eth0 does not seem to be present, delaying initialization

Cause:

  • Newly installed or replaced NIC Card
  • Copy/Move a virtual hard disk to another guest OS with different NIC MAC address

For RHEL/CentOS:

First of all you must edit the network settings in network configuration file (which one you required, e.g. ifcfg-eth0 or ifcfg-eth1) and remove or edit with new NIC Mac Address:

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
#HWADDR=00:0c:29:c6:ac:09  Old MAC Address
HWADDR=00:0c:29:46:b1:d7   # New MAC Address 

Resolution:

Temporary Solution:
Check /sys/class/net/ directory where you can see a symbolic link to NIC number

[root@localhost net]# cd /sys/class/net
[root@localhost net]# ll
lrwxrwxrwx 1 root root 0 Sep 29  2013 eth0 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:01.0/net/eth0
lrwxrwxrwx 1 root root 0 Sep 29  2013 eth1 -> ../../devices/pci0000:16/0000:00:11.0/0000:06:01.0/net/eth1
lrwxrwxrwx 1 root root 0 Sep 29  2013 lo -> ../../devices/virtual/net/lo

[root@localhost net]# ip link set dev eth1 name eth0 (assuming that old NIC was eth0 and new one is detected as eth1)

This will solve the problem for the time being. But you have to keep in mind that this is a temporary solution. Whenever you reboot the pc/server all the settings will go back to its original settings.


Persistent Solution:

Edit 70-persistent-net.rules file, disable the old entry and add a new entry for new NIC MAC Address:


[root@localhost net]# vim /etc/udev/rules.d/70-persistent-net.rules 
# PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:c6:ac:09", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"   //Old one. Add # to disable.

# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool).
#Add this entry for your new NIC
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:46:b1:d7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
[root@localhost net]# 

Cheers!!!


*Thanks to suarez & google

No comments:

Restore Archived Log into VMware Aria Operations for Logs (formerly known as vRealize Log Insight - vRLI)

As we cannot keep all logs in searchable space in vRLI production system due to performance and slowness issue, it is always recommended to ...