Lỗi Clone VM trong Vsphere bị tắt card mạng eth0 vì trùng MAC (fix)

Bringing up interface eth0: Device eth0 does not seem to be present, delaying init

CentOS & Device eth0 does not seem to be present Reference:

https://www.centos.org/docs/5/html/Virtualization-en-US/ch19s20.html Virtualization & Network Interfaces After cloning a CentOS virtual machine, you may observe the following error at boot due to the manual or automatic (vCenter) removal and installation of a new network interface and/or new UUID and MAC address. Note I am using ifup to reproduce after boot.

ifup eth0

Device eth0 does not seem to be present, delaying initialization Fix There are a number of different methods and strategies to resolve the issue. Below is one of many methods. I do not purport this as the ideal solution and continue to seek a better one.

Prior to completing the master template build, do the following:

Remove network rules.

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

Edit ifcfg-eth0

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

and remove references to the old interface.

HWADDR= UUID= Power off host, clone, and convert to template.

Results When generating a new clone of the template with a new network interface, a new 70-persistent-net.rules will be generated, however, ifcfg-eth0 will not be auto-populated with HWADDR and UUID. In addition, the new interface will not be assigned eth1. If using DHCP, you should be assigned an IP address and connected. Otherwise, update ifcfg-eth0, appropriately, then service network restart.

HWADDR & UUID I am fuzzy on what exactly what HWADDR and UUID provide in value, but one or both may be used by network manager which CentOS minimal does not utilize. I update both with the intent of future-proofing the installation.

Use ifconfig or view the network interface settings using the appropriate management console (vCenter) and note the MAC address. Also, use uuidgen eth0 and note the generated UUID.

Edit /etc/syconfig/network-scripts/ifcfg-eth0 and update the values for HWADDR and UUID.