1. Copy an existing virtual machine
Turn off or hibernate the existing virtual machine, right-click to copy --> fill in the virtual machine name, and check "Reinitialize the MAC addresses of all network cards" --> Next, copy completely, and wait for the copy to complete.
2. Resolve ip conflicts
The copied virtual machine ip and mac are the same as the previous virtual machine, which will cause ip conflicts, so we need to reset the mac and network card configuration.
Right-click to modify the mac virtual machine, select Network --> Advanced, refresh a mac address, which is different from the previous virtual machine mac address. Record the mac address, you will need to use it later
Delete the two files in the /etc/udev/rules.d directory: 70-persistent-cd.rules and 70-persistent-net.rules
Start the virtual machine and use the vi editor to modify the content, the command is: vi /etc/udev/rules.d/70-persistent-net.rules
Delete the content of eth0, in vi editing mode (not in insert mode), position the cursor to the line to be deleted, and press d twice.
Delete this line and change eth1 to eth0
Edit the network card configuration information: vi /etc/sysconfig/network-scripts/ifcfg-eth0, modify the information as follows,
Restart the network card, service network restart, a new ip will be generated, use the ifconfig command to view the new ip, and re-modify the network card file.
Just restart the network card, service network restart