Error: "The resource 'hostname' is in use" when removing an ESXi host from vCenter
search cancel

Error: "The resource 'hostname' is in use" when removing an ESXi host from vCenter

book

Article ID: 421133

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Unable to remove an ESXi host from vCenter when it is connected to a vSphere Distributed Switch (vDS)
  • The host is in maintenance mode, but cannot be removed from vCenter.
  • The following error is observed in vCenter:

The resource 'hostname' is in use.

Environment

VMware vSphere

Cause

The ESXi host is still connected to a vDS. If this is the case, the host must first be disconnected or removed from the vDS prior to removal.

 

Alternatively, the host may have a VM or VM template registered.

Resolution

If the host has a VM or VM template registered to it, migrate it to another host or delete it from the host.

Once the host is completely evacuated, follow the steps below to remove the ESXi host from vCenter:

1. Place the ESXi host in Maintenance Mode

(Note: If the ESXi host is part of a vSAN cluster, make sure to select the appropriate Maintenance Mode option that is required for a host to completely leave the vSAN cluster, as if it were being decommissioned).

2. Disconnect the ESXi host from vCenter: Home > Hosts and Clusters > Right-click on the ESXi host > Connection > Disconnect

3. Once the host is disconnected, remove the ESXi host from vCenter (which will also remove the ESXi host from any vDS it is connected to):  vSphere client > vCenter > Hosts and Clusters icon > Right-click on the ESXi host > Remove from inventory

Additional Information

Related issue: Error: "The resource 'Port-ID' is in use" when removing an ESXi host from a vSphere Distributed Switch (vDS) when nothing is using it