Before deploying the environment, want to lazy, directly all clones! There is a problem with the NIC!
The following method is I Baidu get, I tested, is can! Normal use! Network can not use the external network, add a DNS is good!
After installing the CentOS6.5 system in VMware virtual machines, the purified system clones several out to facilitate the later test. Cloning step is very simple, the problem after cloning is the cloned Nic MAC address and the original system MAC address, there will be a conflict in the LAN, you need to change the cloned MAC address.
Explain: In fact, after the clone system has two Nic Eth0 and eth1, the actual effect is Eth1,eth0 is cloned. The clone system will regenerate a MAC address because the system will become eth1 in eth0 plus 1.
Here's how it works:
Software Environment: VMware Workstation 10.0 Virtual Machine CentOS 6.5 physical Machine Windows7
1, first enter the original system, use the command to view the network card information
#ifconfig
Default system boot does not load network card, see eth0 information
Run command
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0
View the MAC address of the ETH0 network card
Device=eth0
Hwaddr=00:0c:29:16:f4:f0
Type=ethernet
uuid=0b1f4512-cefa-4a9e-ae85-adb2ac2a9903
Onboot=no
Nm_controlled=yes
Bootproto=dhcp
Modifying this onboot=yes setting will load the NIC information
Edit complete, Esc key exit, enter: Wq save exit.
2, the same steps into the clone system, check the network card address, found the same MAC address
Perform
#/etc/init.d/network Restart
Restart Network Service
Hint failed failed
3. Edit the network card device
# Vi/etc/udev/rules.d/70-persistent-net.rules
When the following appears, you will see that there are 2 NICs eth0 and Eth1,eth0 for the clone system, eth1 for regeneration
# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:16:f4:f0", attr{type}== "1", kernel== "eth*" , name= "Eth0"
# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:45:97", attr{type}== "1", kernel== "eth*" , name= "Eth1"
Before adding # comment out the first network card, change the 2nd NIC to eth0, record the MAC address.
# PCI device0x1022:0x2000 (Pcnet32)
#SUBSYSTEM = = "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:16:f4:f0", attr{type}== "1", kernel== "eth* ", name=" eth0 "
# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:45:97", attr{type}== "1", kernel== "eth*" , name= "Eth0"
Edit complete, Esc key exit, enter: Wq save exit.
4. Implementation
#/etc/init.d/network restart
Restart Network Service
Or the hint failed,
#reboot
The problem with rebooting the system is solved.
5. After rebooting the system, run the command
1 #vi/etc/sysconfig/network-scripts/ifcfg-eth0
Modify the MAC Address "00:0c:29:16:f4:f0" to "00:0c:29:52:45:97" to save the exit.
Perform
1 #/etc/init.d/network Restart
Restart Network Service
It's not going to fail now.
Device= "Eth0"
bootproto= "Static"
Hwaddr= "00:0c:29:60:ac:f5"
Ipv6init= "No"
Nm_controlled= "Yes"
onboot= "Yes"
ipaddr=192.168.126.133
gateway=192.168.126.2
dns1=192.168.126.2
netmask=255.255.255.0
Type= "Ethernet"
How to modify the network adapter after VMware Virtual machine cloning CentOS 6.5