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

Symptoms:
  • Virtual machines fail to connect to the network
  • There is no network connectivity to or from a single virtual machine
  • You cannot connect to the Internet
  • A TCP/IP connection fails to and from a single virtual machine
  • 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.0
VMware vCenter Server 5.1.x
VMware vCenter Server 6.0.x
VMware vCenter Server 6.5.x
VMware vSphere ESXi 5.5
VMware vSphere ESXi 5.1
VMware vSphere ESXi 6.5
VMware vCenter Server 5.5.x
VMware vSphere ESXi 6.0
VMware vCenter Server 5.0.x
VMware vSphere ESXi 5.0
VMware vCenter Server 4.1.x
VMware vSphere ESXi 6.7
VMware vCenter Server 7.0.x
VMware vCenter Server 6.7.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 (1007819).

    Note: If you are experiencing network connectivity issues with the ESX/ESXi host or with multiple virtual machines, see ESX/ESXi hosts have intermittent or no network connectivity (1004109).
     
  3. Verify that the virtual network adapter is present and connected. For more information, see Verifying virtual network adapter is present and connected to the virtual machine (1003786).
     
  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 (1003899) for Windows and Verifying the networking within a Linux based guest operating system (2022022) for Linux.
     
  5. Verify that the TCP/IP stack is functioning correctly. For more information, see Troubleshooting virtual machine TCP/IP connection issues (1007842).
     
  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 (1179).
  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 is using. 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 any misconfiguration on the physical switch port(s).

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: For translated versions of this article, see: