Troubleshoot virtual machine Clone network card loss issues
1. The virtual machine NIC after cloning is displayed as follows
[[Email protected] Desktop]# ifconfig
Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host
Up LOOPBACK RUNNING mtu:16436 metric:1
RX packets:120 errors:0 dropped:0 overruns:0 frame:0
TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9340 (9.1 KiB) TX bytes:9340 (9.1 KiB)
2. The workaround is as follows
(1) Enable eth1 NIC
[[email protected] Desktop]# cd/etc/sysconfig/network-scripts/
Rename eth0 to Eth1
[email protected] network-scripts]# mv Ifcfg-eth0 ifcfg-eth1
[[email protected] network-scripts] #vim/etc/udev/rules.d/70-persistent-net.rules
# PCI Device 0x8086:0x100f (e1000)
subsystem== "NET", action== "Add", drivers== "? *", attr{address} = = "00:0c:29:a9:a0:68", attr{type}== "1", kernel== "eth*" , name= "Eth0"
# PCI Device 0x8086:0x100f (e1000)
subsystem== "NET", action== "Add", drivers== "? *", attr{address} = = "00:0c:29:28:e5:6a", attr{type}== "1", kernel== "eth*" , name= "Eth1"
Modify the MAC address of the ETH1
Replace the attr{address} value of Name= "Eth1" with the MAC address of Ifcfg-eth1
waddr=00:0c:29:28:e5:6a
Restart Network Service
[email protected] network-scripts]# service network restart
Shutting down interface eth1: [OK]
Close Loopback interface: [OK]
Eject loopback interface: [OK]
Pop-up interface eth1:determining if IP address 192.168.4.5 is already on use for device eth1 ...
[OK
(2) Enable eth0 NIC
[[email protected] network-scripts] #vim/etc/udev/rules.d/70-persistent-net.rules
Remove two lines of configuration information for name= "eth0"
Then Name= "eth1" to Name= "eth0" and copy the value of its attr{address}
[email protected] network-scripts]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Modify its MAC address to the value of the attr{address} that you just copied
Restart Network Service
[email protected] network-scripts]# service network restart
Shutting down interface eth0: [OK]
Close Loopback interface: [OK]
Eject loopback interface: [OK]
Pop-up interface eth0:determining if IP address 192.168.4.5 is already on use for device eth1 ...
Determine