No Healthy Upstream due to duplicate distributed switch database entry
search cancel

No Healthy Upstream due to duplicate distributed switch database entry

book

Article ID: 387593

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

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"

 

 

Environment

vCenter 7.0

vCenter 8.0

Cause

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. 

Resolution

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

 

  1. Take a backup or snapshot of the vCenter
  2. Connect to the vCenter database

/opt/vmware/vpostgres/current/bin/psql -U postgres VCDB

  1. Grab a list of all distributed switches that have the same name

select name,datacenter_id,id from vpx_dvs where name = 'distributed switch name';

  1. Identify the switch with the same name and multiple IDs. Then remove one of the multiple IDs

delete from vpx_dvs where id = 'ID from step 3";