Learn how to clone a virtual machine with VMware, don’t just create a new virtual machine

Preface

When we need multiple virtual machines, if they are all added, it will be more troublesome. At this time, we can use the clone function to quickly create virtual machines.

Prerequisite: There is an installed virtual machine, and the virtual machine is not started

VMware clone virtual machine

Right click on the virtual machine and select the managed clone option

Insert picture description here

After clicking, the following window appears

Insert picture description here
Click Next, select the current state cloned from the virtual machine

Insert picture description here
Next, select the clone type, the difference between the two types is as follows, I choose full clone

Insert picture description here
After selecting the full clone, fill in the name and location of our cloned virtual machine

Insert picture description here
Click finish

Insert picture description here

Modify the virtual machine ip and hostname

After cloning, we also need to modify the virtual machine ip and hostname

Modify hostname

Edit the /etc/hostname file, write the host name you want to modify, and save it with :wq

vi /etc/hostname

Modify the virtual machine ip

Edit the /etc/sysconfig/network-scripts/ifcfg-ens33 file, change the last 128 of the IPADDR value to other numbers and change BOOTPROTO to static (if not, add it)

vi /etc/sysconfig/network-scripts/ifcfg-ens33

Insert picture description here
Description:

BOOTPROTO=static   静态IP

BOOTPROTO=dhcp   动态IP

After saving, use systemctl restart network to restart network

If you want to view the network of the virtual machine, you can use the ifconfig command to view it. The ip address behind inet is the ip address of our virtual machine.

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_36551991/article/details/111145295