ESXi Host fails to remove from vCenter Inventory with error - The object or item referred to could not be found
search cancel

ESXi Host fails to remove from vCenter Inventory with error - The object or item referred to could not be found

book

Article ID: 370273

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

ESXi Host fails to remove from vCenter Inventory with error "The object or item referred to could not be found. vDS dvs port ########-####-####-####-#######c554 cannot be found".

Environment

  • VMware vCenter Server 7.0
  • VMware vCenter Server 8.0

Cause

This occurs if the Host was incorrectly removed from vCenter and the Host entry remains in vCenter Database leading to stale entry.

Resolution

The resolution requires removing the host manually from VCDB (vCenter Database) : 

  1. Ensure that the ESXi host to be removed has no active VMs and / or Templates running onto it and the ESXi host is in Maintenance Mode.
  2. SSH to vCenter with root credentials
  3. Switch to Shell - Refer KB Toggling the vCenter Server Appliance default shell

 

  • Connect to vCenter Database (VCDB)
    • /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
  • Run the command to check the host entry

   # select * from VPX_ENTITY where name ='<Host Name or IP address of the Host to be removed>';

Sample output

VCDB=# select * from vpx_entity where name='esxi01.example.com';

   id    |           name                   | type_id | parent_id

---------+---------------------------+---------+-----------

 1######7 | esxi01.example.com |       1 |   1######7

 1######7 | esxi01.example.com |       2 |         1

Note: There are 2 entries for the same host with id of one of the host entries being the parent_id for the another host entry.

 

Capture the output from above step and Please contact Broadcom support for assistance to remove host from VCDB (vCenter Database).