Troubleshooting virtual machine network connection issues
search cancel

Troubleshooting virtual machine network connection issues

book

Article ID: 324542

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  1. Virtual machines fail to connect to the network
  2. There is no network connectivity to or from a single virtual machine
  3. You cannot connect to the Internet
  4. A TCP/IP connection fails to and from a single virtual machine
  5. You may see one or more of the following errors:
     
    • Destination Host Unreachable
    • Network error: Connection Refused
    • Network cable is unplugged
    • Ping request could not find host (IP address/hostname). Please check the name and try again.
    • Unable to resolve target system name (IP address/hostname).

Environment

VMware vSphere ESXi 7.0.x
VMware vCenter Server 7.0.x
VMware vCenter Server 6.7.x
VMware vSphere ESXi 6.7.x
VMware vSphere ESXi 8.0.x
VMware vCenter Server 8.0.x

Resolution

Process to troubleshooting virtual machine network connection issues:

Important Note: Validate that each troubleshooting step below is true for your environment. The steps provide instructions or a link to a document, for validating the step and taking corrective action as necessary. The steps are ordered in the most appropriate sequence to isolate the issue and identify the proper resolution. Do not skip a step.
 

  1. Ensure that the Port Group name(s) associated with the virtual machine's network adapter(s) exists in your vSwitch or Virtual Distributed Switch and is spelled correctly. If not, correct it using Edit Settings on the virtual machine and ensure that the Connected checkbox is selected.
    • Note: On a virtual standard switch, virtual machines cannot be placed on a vmkernel port group. Standard switches require that each vmkernel has its own port group.
  2. Ensure that the virtual machine has no underlying issues with storage or it is not in resource contention, as this might result in networking issues with the virtual machine. You can do this by logging into ESX/ESXi or Virtual Center/vCenter Server using the VI/vSphere Client and logging into the virtual machine console. For more information, see Troubleshooting a virtual machine that has stopped responding (VM hang/freeze).

    Note: If you are experiencing network connectivity issues with the ESX/ESXi host or with multiple virtual machines, see ESXi hosts have intermittent or no network connectivity.
     
  3. Verify that the virtual network adapter is present and connected. If it is connected, try changing to another network, and then changing it back to the original. For more information, see Verifying virtual network adapter is present and connected to the virtual machine.
     
  4. Verify that the networking within the virtual machine's guest operating system is correct. For more information, see Verifying the networking within a Windows based guest operating system  for Windows and Verifying the networking within a Linux based guest operating system for Linux.
     
  5. Verify that the TCP/IP stack is functioning correctly. For more information, see Troubleshooting virtual machine TCP/IP connection issues.
     
  6. If this virtual machine was converted from a physical system, verify that there are no hidden network adapters present. For more information, see Networking Error: IP address already assigned to another adapter.
  7. Verify that the port group of the virtual machine is configured with two vNICs to eliminate a NIC or a physical configuration issue. To isolate a possible issue:
     
    • If the load balancing policy is set to Default Virtual Port ID at the vSwitch or vDS level:
       
      • Leave one vNIC connected with one uplink on the vSwitch or vDS, then try different vNIC and pNIC combinations until you determine which virtual machine is losing connectivity.
         
    • If the load balancing policy is set to IP Hash:
       
      1. Ensure the physical switch ports are configured as port-channel. For more information on verifying the configuration on the physical switch, see Enable EtherChannel / Link Aggregation Control Protocol (LACP) in ESXi/vCenter and Example Configuration of LACP on VMware, Cisco, and HP switches
      2. Shut down all but one of the physical ports the NICs are connected to, and toggle this between all the ports by keeping only one port connected at a time. Take note of the port/NIC combination where the virtual machines lose network connectivity.
         
    • You can also check esxtop output using the n option (for networking) to see which pNIC the virtual machine uses. Try shutting down the ports on the physical switch one at at time to determine where the virtual machine is losing network connectivity. This also rules out misconfiguration on the physical switch port(s).
    • The other option to identify the uplink is with the help of the command: "netdbg vswitch instance list" and hit enter.

8. Verify that the virtual machine portgroup is configured with the correct VLAN id and check the switchports connected to vmnics allowing that tagged vlan traffic, for reference Sample configuration of virtual switch VLAN tagging (VST Mode) (broadcom.com)

 

Note: ESXi does not log VM connectivity or communication (outside of port or physical link failures seen at the host level), so it is important to perform the troubleshooting steps in this article during the time you are experiencing the issue to be able to determine the cause.

Additional Information

Note: If connection to the default gateway is successful, but connections to other subnets are unsuccessful, then there is an issue in routing/Layer 3. Please contact your network team to determine why the Layer 3 connections are failing.


For more information, see: