VNIC is disconnected after VM power on
search cancel

VNIC is disconnected after VM power on

book

Article ID: 368679

calendar_today

Updated On:

Products

VMware vCenter Server 8.0

Issue/Introduction

VNIC does not reconnect to dvportgroup after graceful shutdown of the Guest OS then reboot of the VM

Environment

 

  • VMware vSphere ESXi 8.0.x
  • VMware vSphere ESXi 7.0.x
  • VMware vSphere ESXi 6.x

 

Cause

Ephemeral DVPG has two characters:

(1) The port is created and deleted when the VM is power on and off.
(2) Host has the ability to create a host assigned dvport(h-) for it.

In the case a VM connected to such DVPG is powered on from the host, hostd creates a host assigned dvport for it, reconfigures the VM VNIC to connect to it, and then powers on the VM. After the power on is finished, vCenter detects the host assigned dvport, creates a normal dvport, and triggers a rekey process to reconfigure the VNIC to it.

However, a host sync is triggered before the VM is power on. So vCenter captures a transient state where the VNIC is connected to host assigned dvport and the VM is in a power off state. vCenter makes the following decision:

(1) It reclaims the (host assigned) port due to character (1).
(2) It triggers the rekey due to character (2).

Both operation works in a get-update-set style. But since the VM is power off, the connect state in the VNIC connectable property is false. When the VM reconfigure call arrives from the host, the VNIC has been connected and that call makes it disconnected.

Resolution

Reboot the Virtual Machine. 

Additional Information

The overall root cause is, that vCenter captures a transient state of the VM power on. Since the VM is connected to ephemeral DVPG, vCenter needs to rekey it. Today, it clones the whole VNIC configuration(which contains the VNIC connect state and is disconnected), updates the port key, and reconfigures the VM. Then the VNIC is disconnected.

VMs using ephemeral distributed port groups for network connectivity could not reconnect to the network if a host sync is issued in-between the time the VM is powered-off and rebooted.  This happens to VMs with the configuration "connect at power-on" selected for the network adapter as well.