To resolve this issue, either remove the vmkernel (vmk) NIC or migrate to a Standard Virtual Switch (vSwitch).
To migrate the vmkernel NIC
- Navigate to Hosts and Clusters and select the ESXi host.
- Under the Configuration tab, click Networking.
- Click the vSphere Standard Switch tab.
- In the top right corner of the switch, click Migrate VMKernel Adapter.
- Follow the prompts to migrate each vmk NIC.
- Make sure everything, including the physical NICs, are removed from the vDS.
- Once completed, you should now be able to remove the ESXi host from the vDS.
Workaround:
If the vDS still cannot be removed from the host, make sure the vDS is not referencing anything on the host in the following areas:
- Port mirroring
- VM templates (on the vDS and in the content library)
- VM snapshots can cause this error, if there is a snapshot taken of a VM on the vDS that is not consolidated. vCenter can still have a resource on that port, even if the VM is no longer on the host or powered off.
Additionally, the host should not have any vmkernels, VMs, or vmnics left on the vDS on the host you are trying to remove.
If everything is off the vDS and the removal of the ESXi host still fails:
- Right click the ESXi host from the Inventory and select Connection > Disconnect.
Note: Ensure to have the ESXi host username and password.
- Proceed to remove the ESXi host from the VDS.
- Right click the ESXi host from the Inventory and select Connection > Connect.
- You should now be able to remove the ESXi host successfully from the VDS.