The virtual machine in use, after replication, found that the network card name has changed, the correct method is as follows:
For example, Eth0 became eth1:
Ifconfig
Udev dynamic management device files:
Cat/etc/udev/rules.d/70-persistent-net.rules
Udev identifies the network card during the boot process and records the MAC address and Nic name in the Udev rules script.
The new virtual machine will automatically generate a MAC address for the virtual machine's network card.
Virtual machine cloning, the previous system already exists eth0 information, for the system is the equivalent of a new network card, the system will be automatically named Eth1 (in order + 1),
Udev will also generate MAC addresses with this network card.
Udev content: subsystem== "net", action== "Add", drivers== "? *", attr{address}== "00:e0:ed:54:b5:2a", attr{type}== "1", kernel= = "eth*", name= "eth0"
Recovery process:
Open Udev file rules:
Vi/etc/udev/rules.d/70-persistent-net.rules
Delete the eth0 line of information, or comment.
Change the eth1 line device name to eth0. Also modify the Ifcfg-eth0 information, if any MAC address is also modified to the same as Udev.
Catalog:/etc/sysconfig/network-scripts/
Restart the network!
This article is from the "Laotaibuxiao" blog, make sure to keep this source http://lubcdc.blog.51cto.com/3785870/1763131
(Linux) replicated virtual machine NIC Eth0 changed to eth1 or other name post-remediation method