KVM clone VM cannot start with network card

#When cloning a new CentOS virtual machine in KVM, the following problems occur:

service network restart
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]

Check with ifconfig and find that eth0 is missing, only lo; check with ifconfig -a and find that there is more information about eth1

#Solution 1:

mv /etc/sysconfig/network-scripts/ifcfg-eth0  /etcsysconfig/network-scripts/ifcfg-eth1
将eth0的mac地址改为eth1的mac地址,同时改变其DEVICE名称为eth1,再重启网络即可

#Solution 2:

rm -rf /etc/udev/rules.d/70-persistent-net.rules
reboot

In short, as long as the information in /etc/sysconfig/network-scripts/ifcfg-eth0 is consistent with /etc/udev/rules.d/70-persistent-net.rules, that is, the network card address is consistent with the network card number, so the service network Restart can be configured successfully

Guess you like

Origin blog.51cto.com/keep11/2619502