4.3 Cloning a virtual machine
When we use VMware to install virtual machines, often the same machine to install more than one case, if a single installation, too much time is not efficient, then how to quickly and good installation of the required system? We might as well try cloning the virtual machine platform.
> Environment:
> VMware 9
> Installed Linux virtual machine one
First, put the installed virtual machine in the shutdown state, and then open the following right-click menu
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/08/B9/wKiom1nmGymDNAyPAABUkaIKLhk794.png "/>
Select Clone under the Manage menu, as
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/A7/68/wKioL1nmGHSQvd-cAAAozi2WMzM533.png "/>
After selecting clone, the Clone wizard will pop up and click "Next"
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/A7/69/wKioL1nmGHTiMzvfAADPTZOPNqI044.png "/>
Select the current state of the virtual machine and click "Next"
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/08/B9/wKiom1nmGyrCsMTOAABZww7iYZY535.png "/>
Select "Create a linked clone" and click "Next"
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/A7/69/wKioL1nmGHTBNHjNAABT91FIrzs459.png "/>
Name the clone in the text box, specify the save path in location and click Finish
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/08/B9/wKiom1nmGyqCbTjtAABAN8xkCLs547.png "/>
When done tick, close the Clone window and click OK. At this point you can look at the VMware navigation bar for a virtual machine that has just been clone completed.
Although cloning is complete, remember to change the cloned virtual machine's computer name and network configuration, remove the network card UUID, change the IP address of the network card
Host Name Modification method:
Hostnamectl Set-hostname newname
****************************************************************************
4.4 Linux Machines log in to each other
Two CENTOS7 virtual machines, 24centos7-01 and 24centos7-02, respectively
Now we need to log in to each other in SSH.
First, let's try to log in to 24centos7-01 24centos7-02
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/A7/69/wKioL1nmGHSwV2zMAAAKkDY2ubw172.png "/>
Successful login via ssh-p port number username @ip
Then try to log in with the 24CENTOS7-01 key in the 24centos7-02
Idea: 24centos7-01 The key pair, keep the private key, save the public key to 24centos7-02
Create a key pair and save to/root/.ssh/
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/A7/69/wKioL1nmGHXA12cyAAEwn-0Vk5c049.png "/>
At this point we can use LS to view
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/08/B9/wKiom1nmGyvQGyRXAAApZo2dNms279.png "/>
Id_rsa is the private key, Id_rsa.pub is the public key, we need to save the public key contents to the/root/.ssh/authorized_keys file of the 24centos7-02 machine.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/A7/69/wKioL1nmGHXQ4QLOAADwNdmbp58678.png "/>
Paste the above public key contents into the/root/.ssh/authorized_keys file of the 24centos7-02 machine by copying
After saving
Now let's try the 24centos7-01 key login 24centos7-02
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/08/B9/wKiom1nmGyvhtu0YAAAoUeK17BI426.png "/>
Key Login Successful!
As for 24centos7-02 under SSH login 24centos7-01, the reason is not repeat the same.
Clone virtual machines, Linux machines log in to each other