Today I found that my virtual machine cannot connect to the external network, I checked and solved it, hereby record it for the reference of friends who use similar situations, the specific problem is as follows: the virtual machine cannot connect to the Internet, after using the ifconfig command to query, it is found that the ens33 network card
is not assigned to an IP;
Background : Everything was normal at first, but the problem occurred when the virtual machine was restarted after the PC was restarted; the virtual machine was configured in NAT mode;
Solution process :
1. Confirm the existence of the network card through ifconfig -a, and confirm that the network card of the virtual machine is not misconfigured.
2. Guess that the services related to the PC and the virtual machine are not enabled. Press Win+r to enter: services.msc; start VMware DHCP and VMware NAT The service (it was not started)
3. Restart the virtual machine and enter ifconfig -a again to find that the ens33 network card has been assigned an IP address and can ping the external network, and the problem is perfectly solved;