A virtual machine loses network connectivity after vMotion
search cancel

A virtual machine loses network connectivity after vMotion

book

Article ID: 318873

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • A virtual machine loses network connectivity after performing a vMotion.
  • When you use tcpdump or Wireshark to analyze packet traffic, you observe that the host does not send a RARP request after moving the virtual machine via vMotion to the destination host.
  • To perform packet captures with pktcap-uw:
    • Identify the VM Switchport and Uplink:
      Locate the VM's active Switchport ID and the physical vmnic it utilizes on the destination host:
      net-stats -l | grep <VM_Name>

    • Capture VM ARPs (VnicTx/VnicRx):
      pktcap-uw --switchport <Switchport_ID> --capture VnicTx,VnicRx --mac <VM_MAC_Address> --ng -o /tmp/vm_vnic_arp.pcapng

    • Capture Uplink RARPs (UplinkSndKernel):
      After a vMotion operation, the receiving host sends a RARP packet on behalf of the VM to update the rest of the network of the VM's new location.

    • Identify which uplink is used by the VM:
      Type esxtop and press n for network.

    • Capture directly on the uplink to verify this egress traffic:
      pktcap-uw --uplink <vmnic_name> --capture UplinkSndKernel --mac <VM_MAC_Address> --ng -o /tmp/uplink_vmnic_rarp.pcapng

  • When you set the Load Balancing policy in the vSwitch or the Teaming and failover policy in the Distributed Port Group properties to Notify Switches, the host sends the RARP request after performing a vMotion.

Environment

VMware ESXi
VMware vCenter Server

Cause

Upstream switch not notified of VM relocation.

Resolution

To resolve this issue, enable switch notification by setting the Notify Switches option to Yes in the Load Balancing policy for the vSwitch or Teaming and failover policy in the Distirbuted Port Group properties 

If setting the Notify Switches option to Yes does not resolve the issue:

  1. Ensure the virtual machine is on the proper VLAN ID after vMotion by checking the port configuration of the vSwitch and physical switch.
  2. Check the VLAN configuration on the vSwitch. If a physical switch port is not set to PortFast or Edge Port, connectivity will be blocked during STP convergence after a vMotion.
  3. Check the subnets assigned to VLANs.
  4. Check the physical switch ports for proper VLAN configuration.
  5. Check the MAC table of the upstream switch is properly updating.

Workaround:

  • Perform manual ping from the Guest OS to the default gateway to force a MAC table update.

Additional Information

For more information on troubleshooting steps, see Troubleshooting virtual machine network connection issues.
For further information on packet captures on ESXi, see Packet capture on ESXi using the pktcap-uw tool.