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
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
This is helpful.. Keep posting.. All the best!
ReplyDeleteGood info.. Hates off ur knowledge
ReplyDelete..keep posting..
Thank you so much....keep posting
ReplyDelete