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) :
shell.set --enabled trueroot:chsh -s /bin/bash root/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgresVCDB=# 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 | 1Capture the output from above step and Please contact Broadcom support for assistance to remove host from VCDB (vCenter Database). Once you are working with Broadcom support, you will likely need a snapshot of the vCenter and powered off snapshots of the vCenters if they are in ELM (Enhanced Linked Mode). vCenter service(s) will need to be stopped during any database changes, so expect some time where vCenter service(s) are not available while Broadcom Support works with you to resolve this issue.