NIC loads issue from restored VM


Issue: when try to restore Linux VM (or physical machine with dissimilar NIC) from another host ESX server, guest (VM) server NIC card may not be activated due to mismatch of network card MAC address in destination host.

Following error message will appear when try to bring up the interface (eg. ifup eth0)

device eth0 does not seem to be present, delaying initialization.

Possible causes are:

Newly installed or replaced NIC Card or restored VM from backup or copy/move from another host server.

Following illustrations are based on CentOS and Vmware ESXi server:

Edit the each network settings in your NIC card and removed this line or edit with your new NIC card eg. Mac Address: HWADDR=90:b1:1c:14:3f:be

#ls –l /etc/sysconfig/network-scripts/

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

Replace HWADDR to correct one.

Temporary Fix:

# cd /sys/class/net
# ls –l

following shows new NIC as eth3 not eth0

Now Crete a symbolic link with new NIC number:

# ip link set dev eth3 name eth0

(assume old NIC was eth0)

#ifup eth0
(bring up the interface eth0)
#ifconfig –a

(check and ensure interface is up with correct IP)

#ping [any ip] to test connectivity.

Here is the issue for this temporary fix; when you reboot the server; all the setting will be revert back to original.

Permanent Fix:

# vi /etc/udev/rules.d/70-persistent-net.rules

Wrong MAC address (old value from source host NIC)

You need to remove the old NIC card and replace the new NIC card with the correct eth0

NIC interface will load automatically from here upon reboots.

Advertisements

About Robiul

Robiul has 15 years of continuous successful career experience in ICT with extensive background in System Engineering, IT infrastructure design, operations and service delivery, managing IT projects / MIS functions for local and multi-national companies with in-depth knowledge of multiple operating systems as well as construct / manage small to medium size Data Center. Proven ability to design and implement medium to semi-large scale LAN/WAN/WLAN and system infrastructures. Academic qualification: Master of Science in Information Systems. Professional certifications are: MCSE, CCNA, ITIL and FoundStone Security Professional, VCP, NetAPP, CISSP etc.
This entry was posted in Linux, VMWare and tagged . Bookmark the permalink.