Solution 1:
1. Set the NIC connection mode of the virtual machine to Nat;
2. Check the vmnet8 status (CMD-> ipconfig/all) in the host and find its IP address, such as 192.168.206.1;
3. Set the IP address in the virtual machine to the same network segment as the above IP address, for example, 192.168.206.46, and fill in the IP address (vmnet8 IP address) just found in the gateway and DNS ). (Or enable the DHCP and Nat services of VMware, VMWare will automatically allocate an IP address with a CIDR block of vmnet8)
After completing the preceding steps, you can ping the host no matter whether the host has a network cable or no Nic. However, when the host is connected to the Internet, you can directly ping the IP address of the host Nic, for example, 192.168.1.18. It does not matter. It can be pinged without a network segment. When the host is not connected to the Internet, only the IP address of vmnet8 can be pinged, but this does not affect the retrieval of shared folder content from the host.
Solution 2:
1. Add a Microsoft loopback adapter Nic
"Select" add "new hardware" on the control panel-enable it to search automatically-select "yes, I have connected to this hardware "-add new hardware devices-install the hardware I manually selected from the list-network adapter-
Select Microsoft on the left, and then the Microsoft loopback adapter is displayed in the right window.
2. Enable the VM. Right-click the NIC icon in the lower-right corner of the Main Window of the VMware software and select Bridge Mode.
3. Configure the loopback Nic IP address and Virtual Machine IP address in the same network segment