Description: The company moved to the site, the computer with the past, the CentOS system connected to the VM with Xshell always fail to connect, and then consider the company moved to the situation, I first suspect that the problem is IP, and then execute ifconfig in the VM to find the CentOS IP, Get to the middle of windows to do Ping, sure enough, Ping does not pass.
Analysis reasons: Because I contact Linux is not a lot, usually also on the development of time, to use when testing, so, in the face of this problem, I am unable to analyze the reasons, so, Baidu, netizens give the reason is: IP changed after, The IP of the VM and the IP of Windows may not be on the same network segment, causing the connection to fail.
Workaround: Know the reason is that IP is not on the same network segment, the solution is simple, it is configured to the same network segment can be. For example, my CentOS IP is 192.168.1.110, and the IP of Windows is 192.168.10.11, then I will modify the CentOS IP to 192.168.10.X (X for 0-255) on the line.
So under Windows to ipconfig
find the IP of Windows, and then in the VM to vi /etc/sysconfig/network-scripts/ifcfg-eth0
modify the configuration of the network card, after saving the exit, the service network restart
new network card configuration to take effect, and then to Windows to ping again, test success.
Solve the way that win cannot ping a VM virtual machine CentOS System