vmware complete clone (linux)


The full clone in vmware is based on the specified virtual machine to clone the same copy, no need to install

But we must ensure that the three places are not the same, one is the host name (hostname), one is the virtual network card device mac address, and the other is the ip address

So we have to modify these three places after cloning

Here take centos as an example

1. First perform a full clone , pay attention (the virtual machine to be cloned needs to be turned off before cloning)

Right-click the virtual machine to be cloned, select Manage, and then select Clone

Then until this step, select the full clone. Note: Linked clone refers to the sharing of two virtual opportunities on some resources. Here is no detailed introduction. The full clone is a new virtual machine that is completely independent.

Then in the next step, enter the name of the virtual machine name you want to complete

Note that after cloning, all information is the same as the original virtual machine, so let's modify some information below

 

2. Modify the mac address before booting (Note: If the IP address is generated dynamically, please start the cloned virtual machine before starting to ensure that the original virtual machine's IP will not change, otherwise the original virtual machine's IP will change, after cloning The virtual machine ip is the original virtual machine ip)

Click to edit the virtual machine settings, select the network adapter, click Advanced in the lower right corner and then the mac address below, this mac address is the same as the cloned one, we click generate and regenerate a new one

Then the mac address is modified

Of course, there is a second method to modify the mac address. Below is the storage location of the mac address after booting.

We just delete the first file above and edit the second file

 Note that eth0 at the back represents the first network card. To see which one is available, use ifconfig to check

Use vi to modify, delete the content in the second black box above, and then you can modify the ip address by the way. If it is modified here, the fourth step below does not need to be modified.

After restarting the mac address, it will be changed

3. Modify the host name after booting

Enter the following first line command in the terminal, find the value after hostname = and change it to the name you want to modify,

This will take effect after the next startup. If you want to take effect immediately, use the following command. Although the following command can take effect immediately, this command is only temporarily changed to a new name.

If it will be restored after restarting

That is: the first command: permanently take effect (note: the host name may be changed in different Linux versions, and the modification method is also different, centos7 is the vi / etc / hostname command to edit the host name)

  Second command: Restart is invalid

 

4. Modify the IP address 

It should be noted here: If the virtual machine uses dynamic ip allocation, then there is no need to change the ip. If you want to change to a static ip, please search for related articles to make changes.

Note that the eth0 behind this is the first network card, which can be viewed through ifconfig, select the corresponding file

Find the following line and modify it to the IP address you want to set

Then the cloning is completed,

Check the information with ifconfig

Published 69 original articles · Like 72 · Visit 240,000+

Guess you like

Origin blog.csdn.net/londa/article/details/103390985