[Basics of Operation and Maintenance Knowledge] How to use Xshell to connect to VMware virtual machines and troubleshoot problems

First of all, we need to know the conditions for connecting to the Linux system. We need to have the IP address, port, protocol, user name and password.

We first open the virtual machine and log in.

2587b34914d87d75d1760bb6a1de96cf.png

Open the installed Xshell 5 (if you haven’t downloaded it, you can download it at the end of the article), let’s click New.

85feb45ba31d7f04f11bfd436be9d466.png

Modify the name (custom), host (consistent with the Linux IP address), click OK, and our protocol and port will be defaulted.

fcb652554d041be5d3278e02069a6f87.png
8ae80c65521c25f980f4ccfec8b21a24.png

You can see that it has been created, let's click Connect.

1bed94341af26b6651c1ecf1649ac33c.png

When prompted with a security warning, we click to accept and save to avoid having to accept it every time.

aad168609ee911359d84fe708913d5ec.png

Perform the following operations according to the picture prompts.

3d4f9b175ce6f59130253fe1504d9e4b.png
86628443f3fb6deaa4896f376d450c60.png

Found that the login was successful and you're done!

b5684ee3ed6551043675d5024fb5ee9a.png

If everything goes well, the link will be successful. However, we often fail to connect due to various problems during the operation. Next, I will provide you with some troubleshooting ideas.

First of all, we need to understand the link logic. How to link two computers. It is very simple. You can connect through a network cable. If two computers set the same network segment, you can build a LAN. But when we need to connect many computers, we need a switch, thus forming a local area network. The process of using Xshell to connect to the virtual machine is the process of interaction between computers. It is easy to troubleshoot if you know the principle.

e70985a55b005a1871e42e6cfbe85e6c.png

First, we need to ping the IP address of the virtual machine system through local cmd or Xshell, taking 10.0.0.200 as an example.

ping 10.0.0.200

If the ping is successful, the connection is generally possible. If the ping cannot be successful, we first check whether the IP is 10.0.0.200 under the virtual machine.

8503c6f7f86bdc11c2b34a95e1e81594.png

If ping fails, we need to modify the system IP address to 10.0.0.200, which means modifying our network card configuration file.

vim /etc/sysconfig/network-scripts/ifcfg-eth0

If you don’t know how to operate it, you can refer to this article: vim and its shortcut key operation tutorial

You can also use the method of reinstalling the Linux system to solve the problem.

If you need to reinstall Linux, you can refer to this article: How to create a Linux system on VMware (CentOS7.9)

Secondly, we need to check the virtual network editor of the virtual machine to see whether the IP of Vmnet8 is 10.0.0.X and whether the subnet mask is 255.255.255.0. If not, modifications need to be made. We need to ensure that its subnet The IP is in the same network segment as the system IP settings. This virtual network editor has the same function as the switch.

250c2f0a39a714634d0ec5dcdfc9233f.png

If there is no problem here, we need to check the local Vmnet8. If the position in the box below is selected, there is no need to check, but if it is not selected, we need to set a fixed IP.

ee6681ee96d94fac5ae98600c0f6d244.png

Open this computer and search for network links. We can see 1 and 8 of VMware Network. If you don't see it, the consequences will be serious. You can try to restore the default settings by clicking on the picture above. If not, uninstall and reinstall the virtual machine. If it is still there, If not, you can only reinstall the system.

8eea387f4f353318ebd3fe43ef7d6650.png

Right click on the properties of VMnet8.

6c9460fa75fe68bf580119cb8bdbd474.png

Double-click the protocol version.

4d3991fe8ac4e4e0e7b61bd2dc234f72.png

Select Use the following IP address, make the following settings, and finally click OK.

f8b545b842f883e6a72815329ef3b116.png

If you have completed the above operations and still cannot find the IP, you can try to close NetworkManager, enter the first line of the command in the virtual machine, then press Enter, then enter the second line and press Enter.

systemctl stop NetworkManager                #关闭此网络服务
systemctl disable NetworkManager             #将此网络服务设置为开机不启动

You're done!

 

Xshell 5 download link: https://pan.baidu.com/s/1rJFVo1ySQL_UcqkIwi6lkQ?pwd=10g7

My name is Koten. I have 10 years of operation and maintenance experience. I continue to share operation and maintenance tips. Thank you for reading and paying attention!

 

Guess you like

Origin blog.csdn.net/qq_37510195/article/details/129181356