Friday, January 10, 2014

Can't Start network on New RHEL6 VM Clone

After cloning a RHEL 6 VM I could not get the network running, got error that the nic was not present.
Problem turned out to be that when cloning the new VM gets a new MAC but RHEL UDEV still showed the configuration of the network before cloning so there was a conflict.  On the source VM I had an eth0 on the cloned VM I only had eth1 and no eth0.



You need to edit  /etc/udev/rules.d/70-persistent-net.rules
Find these lines:
# PCI device 0x15ad:0x07b0 (vmxnet3) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:bc:00:45", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


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


Look at the entries and find your virtual NIC MAC address, You can get that In VSphere client by editing the new cloned system clicking on the NIC and you will see the MAC  listed on the right side of the properties box.   


In the 70-persistent-net.rules file you should see that the entry for eth1 has the new MAC not eth0.


Delete entry referring to eth0 i.e., NAME=”eth0”


On the remaining entry edit NAME=”eth1” to NAME=”eth0”


Now fix  /etc/sysconfig/network-scripts/ifcfg-eth0 by making sure the HWADDR matches the correct MAC address.
 
Restart the network or reboot as necessary.

No comments:

Post a Comment