Removing the ESXi host from the vCenter GUI, the task is executed but the ESXi host is not removed from the inventory. No errors are observed.
As an alternative approach, while attempting to remove the ESXi host from the VCDB, multiple entries of the host are identified. After removing all associated entries, the vpxd service fails to start or crashes due to a mismatch in the host’s parent IDs.
VMware vCenter Server 6.x
VMware vCenter Server 7.x
VMware vCenter Server 8.x
The vpx_entity table contains multiple entries for a single ESXi host, with each entry associated with a distinct Parent ID. This mismatch causes the VPXD service to fail when trying to remove an ESXi host from the VCDB.
service-control --stop vmware-vpxd/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgresselect * from vpx_entity where name='esxi host name';example.example.com. This host returns the below output when the select statement is executed.id | name | type_id | parent_id-------+-----------------------------+---------+-----------64194 | example.example.com | 2 | 5815464193 | example.example.com | 1 | 64194 select id,dns_name from vpx_host where dns_name='example.example.com';select * from vpx_entity where id='58154'; id | name | type_id | parent_id-------+----------------+---------+----------- 58154 | ESXi Folder | 6 | 668select id from vpx_vm where host_id = 58154;ALTER TABLE vpx_entity DROP CONSTRAINT fk_vpx_enti_ref_vpx_enti;update vpx_entity set parent_id=58154 where id=64193;select * from vpx_entity where name='esxi host name';id | name | type_id | parent_id-------+-----------------------------+---------+-----------64194 | example.example.com | 2 | 5815464193 | example.example.com | 1 | 58154ALTER TABLE vpx_entity ADD CONSTRAINT fk_vpx_enti_ref_vpx_enti FOREIGN KEY (parent_id) REFERENCES vpx_entity(id);service-control --start vmware-vpxd