If a virtual machine (VM) in a VMware workstation cannot establish a connection to other VMs or the internet, then you should check the settings in the guest operating system, in the virtual network, and in the adapter configuration of the host OS. Both NAT and bridged networks can be affected by such problems.

Usually, you start investigating the network settings of the guest operating system. If the VM is not connected to the vSwitch, Linux will display the message Cable unplugged.

In Windows guests, you can query this status with PowerShell:

Get-NetAdapter -Physical | select Name, MediaConnectionState

In this case, you either have forgotten to activate the Connect at power on option in the VM settings, or you have accidentally clicked on the network icon in the VMware Workstation status bar.

If the virtual adapter is not connected to the vSwitch you can change this in the VM settings

If the virtual adapter is not connected to the vSwitch you can change this in the VM settings

A simple remedy here is to activate the Connected checkbox.

Check configuration in guest

The next step is to use well-known utilities, such as ipconfig (Windows) or ifconfig (Linux), ping, and nslookup, to check the IP configuration. It might turn out that at some point, you assigned a static IP to the adapter that no longer fits. The same can apply to the DNS server settings.

If you need to adjust the settings here, it is helpful to unplug the virtual network cable and plug it back in to activate the changes. This is done via the above-mentioned icon in the status bar.

Disconnect and reconnect the network via the icon in the status bar

Disconnect and reconnect the network via the icon in the status bar

For Windows guests, you can achieve the same effect with Restart-NetAdapter .

Check the virtual network

If the settings in the guest OS look correct, the next step is to open the virtual network editor from the Edit menu. This starts in read-only mode and does not show all networks until you click Change Settings and log in with an administrative account.

Editing virtual networks requires elevated permissions

Editing virtual networks requires elevated permissions

Then open the settings of the network that you assigned to the malfunctioning VM.

For the Bridged type, the value Automatic is preset under Bridged to. However, the adapter assigned in this way is sometimes unsuitable, so you should explicitly select the appropriate one from the list. This is usually the physical adapter.

Incorrect automatic settings for Bridged to can be the cause of connection problems

Incorrect automatic settings for Bridged to can be the cause of connection problems

With NAT networks, there are several possible causes of misconfiguration. For example, the settings for the subnet may differ from those used in the VM. In addition, the integrated DHCP server can be activated here, which assigns an unsuitable configuration to the virtual machines.

There are several potential causes of connection problems in the NAT settings

There are several potential causes of connection problems in the NAT settings

Another potential stumbling block is the NAT settings if there are any outdated values for the gateway or DNS servers. If the VMs get their settings from an external DHCP server, you can turn off the internal DHCP service and set the DNS configuration to Auto detect.

If none of these measures have helped, you can use Restore Defaults to restore the original settings for all virtual networks.

Examine the adapter settings in the OS host

If you have not been able to solve the connection problems yet, it is worth taking a look at the adapter settings that underlie the respective virtual networks on the host.

For Windows hosts, follow the More network adapter options link in the Settings app under Network and Internet.

VMware installs its own protocol for the bridged network

VMware installs its own protocol for the bridged network

Bridged is mapped to vEthernet (VMware Network) by default. There, you have to make sure that the VMware Bridge Protocol is activated in the properties of the adapter.

The NAT network is normally based on VMnet8. You don't need the bridge protocol there, but you should check if unsuitable values have crept into the IPv4 or IPv6 configuration.

In my case, a static IPv4 address has been assigned to the adapter and it was, for some reason, the same one that I had entered in the Virtual Network Editor for the gateway. After switching to DHCP, the VM regained network access.

Summary

Troubleshooting network and internet connection issues in VMware Workstation VMs can be very tedious. There are several places where incorrect settings can be the cause.

Subscribe to 4sysops newsletter!

In addition to the IP configuration in the guest OS, you should also examine the settings of the VM, the virtual networks, and the adapters in the host operating system.

avatar
0 Comments

Leave a reply

Your email address will not be published.

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account