After rebooting vCenter, vpxd fails to start
/var/log/vmware/vpxd/vpxd.log displays the following error
Duplicate entry found for child "Switch Name" in folder "Datacenter Name"
vCenter 7.0
vCenter 8.0
The vCenter has two distributed switch that have the exact same name.
This can be confirmed by running the following command:
select name,datacenter_id,id from vpx_dvs where name = 'distributed switch name';
If this command shows more than one entry with the same name vpxd will not start.
Clean up the duplicate entry
Cleaning up the duplicate entry in the database will leave VMs with orphned port group references and could cause VM network disconnects. Attempt this during a change window
/opt/vmware/vpostgres/current/bin/psql -U postgres VCDB
select name,datacenter_id,id from vpx_dvs where name = 'distributed switch name';
delete from vpx_dvs where id = 'ID from step 3";