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".
This occurs if the Host was incorrectly removed from vCenter and the Host entry remains in vCenter Database leading to stale entry.
The resolution requires removing the host manually from VCDB (vCenter Database) :
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres# 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).