When attempting to remove a host from a vSphere Distributed Switch (vDS), the task fails with a status of "The resource '##' is in use".
VMware vSphere
There is some resource, for example a VM, a VM template, or a vmkernel adapter, on the host that is still connected to the vDS preventing removal.
Navigate to the host in vCenter and select Configure -> Networking -> Virtual Switches and see what VMs, VM templates, vmkernel adapters, or uplinks are still connected to the vDS and remove them.
NOTE: Before removing any uplinks, it is strongly encouraged to move or power off any VMs or vmkernel adapters on the distributed switch first to prevent any network disruption.
After the vDS is empty (see below screenshot for reference), re-attempt the operation to remove the host from the vDS.
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, see The resource 'Port-ID' is in use error when removing a host from vSphere Distributed Switch (vDS) when nothing is using it.