When administrators attempt to remove an ESXi host from a vSphere Distributed Switch (vDS) within the vCenter Server UI, the task fails with error:
"The resource '##' is in use"The resource 'Host_NAME' is in use. Cannot remove the host ###### because it's part of VDS #####"This issue occurs because a dependent network resource remains connected to the vSphere Distributed Switch on the host. The vCenter Server will prevent the removal of the ESXi host from the vDS to prevent a network outage if active objects (such as virtual machines, VM templates, VMkernel adapters, or physical uplinks) are still bound to the switch's portgroups.
vmk1) in use: Migrate the VMkernel adapter (e.g., vmk0, vmk1) to another vDS or a Standard Switch. Refer, Migrate VMkernel Adapters to a vSphere Distributed Switch or Migrate a VMkernel Adapter on a Host to a vSphere Standard Switch.NOTE: Before removing any uplinks, it is highly recommended to migrate or power off any VMs or VMkernel adapters currently using the distributed switch to prevent network disruptions.
Once the vDS is completely empty of associated objects on that host, re-attempt the operation to remove the host from the vSphere Distributed Switch.
If there is no object shown as using the vDS in the host view but the error message still appears reporting a port in use, refer The resource 'Port-ID' is in use error when removing a host from vSphere Distributed Switch (vDS) when nothing is using it.