Posted by : itemxp
วันพุธที่ 30 กันยายน พ.ศ. 2558
CentOS & Device eth0 does not seem to be present
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.