Vmware/vsphere cloning host Nic failed to start

Source: Internet
Author: User

Main Title: Vmware/vsphere Making a template operating system

Subtitle: Vmware/vsphere cloning host Nic failed to start


A newly installed virtual machine in the Vmware/vsphere will be converted to a virtual machine template after the following two files have been commented and shut down.

[root]# cat/etc/udev/rules.d/70-persistent-net.rules# subsystem== "NET", action== "Add", drivers== "? *", ATTR{address} = = "00:50:56:8c:19:a6", attr{type}== "1", kernel== "eth*", Name= "eth0" # Note this line subsystem# more than one network card when there will be more than SUBSYSTEM, all comments can be [root] # cat/etc/sysconfig/network-scripts/ifcfg-eth0# hwaddr=00:50:56:8c:19:a6# Note This line hwaddr# multiple NIC will have ifcfg-eth1, Ifcfg-eth2, etc., the HWADDR item in all files is commented

After the comment is turned off, the server is converted to a template or used to clone the host, and when the system is started, all network cards will start up and get the IP address properly.

Readers do not have to worry about commenting that these two things will have an adverse effect on the operating system, bold to do, explained below.
VSphere system conversion to template step: Right-click the host (shutdown status), templates, clone as template/convert to template
VMware Clone host steps: Right-click the host (Shutdown status), management--clone

How the clone host Nic fails to start:
When the CentOS system starts, it detects the network card MAC address and writes the/etc/udev/rules.d/70-persistent-net.rules, for example, "00:50:56:8c:19:a6", which corresponds to the NIC interface is eth0. Nic file/etc/sysconfig/network-scripts/ifcfg-eth0, Device=eth0 corresponds to the same 00:50:56:8c:19:a6. So Ifcfg-eth0 and 70- Persistent-net.rules the eth0 and MAC address mappings in two files are the same.
A VMware or vsphere cloning operating system assigns a new MAC address to the NIC, such as the new Mac is 01:50:56:8c:19:a6. Then the original "00:50:56:8c:19:a6" has ceased to exist. After the operating system starts to detect this MAC address, continue to write to the 70-persistent-net.rules file, and then name it in order of Eth0,eth1,eth2. The original eth0 already exists. So the new MAC address 01:50:56:8c:19:a6 will correspond to eth1. But the ifcfg-eth0 corresponds to the hwaddr address 00:50:56:8c:19:a6 (old). This is the cause of the network card boot failure, because the MAC address and eth0 the correspondence between the confusion. Therefore, the correspondence between 70-persistent-net.rules's Mac and eth0 is consistent with the HWADDR and eth0 files in the Ifcfg-eth0 file, so there is no problem with network booting. One thing to note is that the MAC address should be based on the 70-persistent-net.rules file, Ifcfg-eth0 's HWADDR is just for the convenience of people to see.
Therefore, the content of the comment 70-persistent-net.rules is to maintain the order of naming from Eth0 when the system detects a new MAC address and corresponds to eth* at startup. The HWADDR of the annotation ifcfg-eth0 is to enable Ifcfg-eth0 to map any new Mac instead of a fixed one. So after the system starts, the new Mac, Eth0, Ifcfg-eth0.


This article is from the "Change" blog, so be sure to keep this source http://changeflyhigh.blog.51cto.com/8317626/1923816

Vmware/vsphere cloning host Nic failed to start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.