Categories

Friday 24 January 2014

"Device eth0 does not seem to be present" After Cloning a Centos machine on Vsphere


Hi,

After cloning or moving a machine in VSphere, On starting the Virtual machine, I got error message as below

"Device eth0 does not seem to be present" Delaying initialization.

On cloning a Virtual machine on Vsphere, we need to edit the MAC adress on the VM settings. This change is recognized by the new VM . But it will list the NIC as eth1 instead of eth0, as eth0 MAC adress(Adress of the VM from which we cloned it) is still in the configuration file of new VM.

The configuration file where the Centos machine stores its NIC information is in

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

This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:02:bf:b5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:8b:2f:fd", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


As you can see tat the new MAC Adress is recognized as the adress for eth1. So eth0 won't start.


so we need to edit that file and delete the first entry of in that file.


Then rename the eth1 to eth0  keeping only the second line.


After that start udev configuration using the command below


start_udev

Now restart network services:
service network restart
 
If there is proper configurations are set in the file /etc/sysconfig/network-scripts/ifcfg-eth0, then the eth0 will start.

Cheers
Syam
 


No comments:

Post a Comment

Ad