VMware clone virtual machine after NIC name and network address Xiuf

Source: Internet
Author: User
Tags one more line uuid

After using VMware to clone a virtual machine, the Wakahara host NIC name is Eth0, then the cloned host uses Ifconfig to see only a network card named Eth1.

And in/etc/sysconfig/network-scripts/this directory only has ifcfg-eth0 a network card configuration file

The Ifcfg-eth0 device property is also eth0

Then we cannot modify the network address and status of the eth1 displayed in Ifconfig, we need to make the Eth0 configuration file effective in order to use the NIC properly.

First look at the network device bindings file:/etc/udev/rules.d/70-persistent-net.rules

Original host this file content:

# PCI Device0x8086:0x100f(e1000) SUBSYSTEM=="Net", action=="Add", drivers=="?*", attr{address}=="00:0c:29:99:f1:6b", attr{type}=="1", kernel=="eth*", name="eth0"

Clone host this file content:

# PCI Device0x8086:0x100f(e1000) SUBSYSTEM=="Net", action=="Add", drivers=="?*", attr{address}=="00:0c:29:99:f1:6b", attr{type}=="1", kernel=="eth*", name="eth0"# PCI Device0x8086:0x100f(e1000) SUBSYSTEM=="Net", action=="Add",drivers== "? *", attr{address}== "00:0c:29:41:6a:1f", attr{type}=="1", kernel=="eth*",name= "Eth1"

At this point, you will find that the network card binding file of the clone host is one more line parameter, and the Name= "eth1" of this line parameter, and the MAC address in attr is different from the MAC address in the original host attr parameter.

To view the NIC configuration file for a cloned host:

Device="eth0"Bootproto="Static"hwaddr= "00:0c:29:99:f1:6b"ipaddr="172.28.1.7"NETMASK="255.255.255.0"GATEWAY="172.28.1.1"DNS1="114.114.114.114"Ipv6init="Yes"nm_controlled="Yes"Onboot="Yes"TYPE="Ethernet"UUID="16501FD4-CF67-4E3A-8F1E-DB6B9543A3BF"

The HWADDR parameter in the NIC configuration file of the clone host is the same as the MAC address of the original host, the above two parts are the cause of the problem, if you need to repair the network of the clone host, the two files need to make corresponding changes:

1. Modify the NIC binding file: (Note the binding of the original host and change the name value in the newly generated row parameter to "eth0")

# PCI Device0x8086:0x100f(e1000)#SUBSYSTEM=="Net", action=="Add", drivers=="?*", attr{address}=="00:0c:29:99:f1:6b", attr{type}=="1", kernel=="eth*", name="eth0"# PCI Device0x8086:0x100f(e1000) SUBSYSTEM=="Net", action=="Add", drivers=="?*", attr{address}=="00:0c:29:41:6a:1f", attr{type}=="1", kernel=="eth*",name= "Eth0"

2. Modify the "HWADDR" property in the NIC configuration file, and assign the value of the attr parameter of the new line in the NIC binding file to the "HWADDR" property of the NIC configuration file:

Device="eth0"Bootproto="Static"hwaddr= "00:0c:29:41:6a:1f"
IPAddr="172.28.1.7"
NETMASK="255.255.255.0"
GATEWAY="172.28.1.1"
DNS1="114.114.114.114"
Ipv6init="Yes"
Nm_controlled="Yes"
Onboot="Yes"
TYPE="Ethernet"
UUID="16501FD4-CF67-4E3A-8F1E-DB6B9543A3BF"

3, restart the device reboot, check the ifconfig output after the network card is normal.

VMware clone virtual machine after NIC name and network address Xiuf

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.