Centos network adapter not working after cloning

Symptom: 

Eth0 interface will not be present for a Centos VM after cloning. Only the loopback networking interface will be available. If you try to turn up the interface manually (using the command ifup eth0 or ifup-eth0), you will receive the below error.


Device eth0 does not seem to be present, delaying initialisation 


Root Cause:


When you clone a Centos VM from a template, a new NIC card will be created for the cloned VM. In other terms, a new MAC address will be generated for the NIC of the cloned machine. This change happens only in VMware perspective and no modification is made in Centos. Therefore the kernel will be still searching for the NIC with old MAC address and hence fails.



Resolution:


1. Update the exisiting ethernet configuration file to reflect the new MAC address. 


Check the new MAC address using vSphere client and modify the ifcfg-eth0 interface configuration using the command:



vi /etc/sysconfig/networking/devices/ifcfg-eth0


Replace HWADDR with the new MAC address 


2. Remove the kernel's networking interface rules file


rm -f /etc/udev/rules.d/70-persistent-net.rules


3. Reboot the VM


Comments

  1. This is helpful.. Keep posting.. All the best!

    ReplyDelete
  2. Good info.. Hates off ur knowledge
    ..keep posting..

    ReplyDelete
  3. Thank you so much....keep posting

    ReplyDelete

Post a Comment

Popular posts from this blog

VMware and Windows Interview Questions: Part 2

VMware and Windows Interview Questions: Part 3

VMware vMotion error at 14%