What if the virtual machine CentOS 7 fails to access the Internet and the cable is pulled out?

Time:2021-1-8

My virtual machine, centos7, often appears “the cable has been pulled out”, which makes it impossible to access the Internet and connect. At first, I didn’t know why. It was very troublesome to initialize the network configuration every time. Later found that the original is very simple, but the two services are disabled, as long as you open it. Now I will give you a detailed introduction of the solution.

1. View network connection settings

Open the virtual machine settings through ‘virtual machine’ – > ‘Settings’ or Ctrl + D to view the network connection mode settings in the network adapter settings. Here, I choose NAT mode to connect;

2. Open related services

1) On the desktop, left click “computing” and select “management” to open the “computer management” window

2) Click “services and Applications” > “services” to search VM related services;

3) Right click “VMware DHCP service” and click open to open “VMware NAT service” in the same way

3. Confirm virtual machine network connection

After the service is started, you can see that it is connected through the network configuration. It means the problem is solved.

matters needing attention:We must pay attention to the nature of the problem, and do not modify it numbly.