[YYYY-MM-DD hh:mm:ss.283 01624 warning 'App' opID=35C8EC56-0010FD71] [MoDVSwitch::UpdateHostNetworkSummaryOnDvsDestroy] Invalid host member [host-635] found in the vDS. [2011-05-31 12:24:32.295 01624 error 'App' opID=35C8EC56-0010FD71] [MoDVSwitch::HostCallPreFlightCheckInt] DVS.ConfigSpec.host[host-635].host not registered in vmom
Warning:
Theses steps should not be used on environments using vCloud Director.
Caution:
Please consult a Broadcom Support Engineer before performing these steps
Note:
These steps are for vCenter Server using a Microsoft SQL database or vPostgres.
Disclaimer:
To manually remove an ESXi 7.x and 8.x host from the vCenter Server database:
service-control --stop vmware-vpxd
Connect to the vCenter Server vPostgres database:/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
select ID, parent_id from VPX_ENTITY where name ='<esxi host name>';
delete from vpx_ds_assignment where entity_id in (select id from vpx_vm where host_id = 24699);
delete from vpx_nw_assignment where entity_id in (select id from vpx_vm where host_id = 24699);
select id from vpx_vm where host_id = 24699;
delete from vpx_dvhost where host_id = 24699;
delete from vpx_dvport_membership where host_id = 24699;
delete from vpx_dvs_blob where host_id = 24699;
vpx_host_x
vpx_host_vm_config_option
vpx_compute_resource_dpm_host
vpx_host_cpu
vpx_host_node
vpx_host_node_cpu
vpx_host_pci_device
vpx_host_cpu_thread
vpx_host_cpu_cpuid_feature
delete from vpx_entity where id = 24699;
delete from vpx_entity where parent_id = 24699;
delete from vpx_entity where id = 24699;
In case the ESXi Host is as standalone host (not part of a cluster), additional steps needs to be taken to avoid any invalid situation where a standalone compute resource is left without a host.
To remove standalone ESXi Host from vCenter Database:
SELECT id, name FROM vpx_entity WHERE type_id = 2 and id not in (SELECT a.id FROM vpx_entity as A LEFT JOIN vpx_entity as B ON A.id = B.parent_id where a.type_id=2 and b.type_id=1 GROUP BY A.id);
Example:
"SELECT * FROM vpx_entity WHERE type_id = 2 and id not in (SELECT a.id FROM vpx_entity as A LEFT JOIN vpx_entity as B ON A.id = B.parent_id where a.type_id=2 and b.type_id=1 GROUP BY A.id);"
id | name |
--------+--------------------------+---------+-----------
187911 | somename---------------- |
187913 | somename---------------- |
(2 rows)
DELETE FROM vpx_entity WHERE parent_id = ###;
DELETE FROM vpx_entity WHERE id = ###;
Example:
DELETE FROM vpx_entity WHERE parent_id = 187911;
DELETE FROM vpx_entity WHERE id = 187911;
service-control --start vmware-vpxd