The resource 'Port-ID' is in use error when removing a host from vSphere Distributed Switch (vDS)
search cancel

The resource 'Port-ID' is in use error when removing a host from vSphere Distributed Switch (vDS)

book

Article ID: 413617

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When attempting to remove a host from a vSphere Distributed Switch (vDS), the task fails with a status of "The resource '##' is in use".

Environment

VMware vSphere

Cause

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.

Resolution

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.

  • If the object is a VM, either move it off the host if the vDS itself will remain in-use, or edit the VM's settings to move the VM's network adapter to a different vDS or standard switch portgroup.
  • If the object is a VM template, the template must be converted to a VM and then it can either be migrated off the host or have the network changed to a different vDS or standard switch portgroup.
  • If the object is a vmkernel adapter (e.g. vmk0), migrate it to another vDS or standard switch. See Migrate VMkernel Adapters to a vSphere Distributed Switch or Migrate a VMkernel Adapter on a Host to a vSphere Standard Switch as needed.
  • For any remaining uplinks, select "Manage Physical Adapters" and remove the uplinks from the vDS.

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.

Additional Information

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.