Solution to NIC unavailability after Virtual Machine cloning
Environment: centos6.5
Edit # vim/etc/udev/rules in the cloned VM. d/70-persistent-net.rules has two rows of records, asking the attributes of eth0 and eth1 respectively to comment out the first row, and then changing eth1 of the second row to eth0. Remember the value in attr, that is, the mac address assigned to this virtual machine # vim/etc/syscofig/network-scripts/ifcf-eth0 modify the mac address to the new mac address remembered above, change onboot to yes, restart the network service after saving and exiting # service network restart
Method 2
My centos still reports an error after being modified according to the preceding method. You can use another method, in fact, the principle is the same # cp/etc/syscofig/network-scripts/ifcf-eth0/etc/syscofig/network-scripts/ifcf-eth1 to copy a new network card eth1, and edit # vim/etc/syscofig/network-scripts/ifcf-eth1 to change the first line name to eth1, change onboot to yesmac address to the eth1 mac address in the above 70-persistent-net.rules file, restart the network service # service network restart
Method 3
Just saw the third method, Nic startup failure is nothing more than mac address conflict, You can edit/etc/syscofig/network-script/ifcf-eth0 to directly Delete the mac address that line, change onboot to yes, and then delete the 70-persistent-net.rules file, which will be automatically generated after the system restarts. # Vim/etc/syscofig/network-scripts/ifcf-eth0 Delete the HWADDR = 00: 0C: 29: BE: B0: 45 line, save and exit, change ONBOOT = no to ONBOOT = yes # rm-rf/etc/udev/rules. d/70-persistent-net.rules # reboot // restart and restart the service network restart.