Source vCenter Server has duplicate names in a network folder.

During upgrade from vsphere 6.0 to 6.5 you can got the following error:

Error

Source vCenter Server has duplicate names in a network folder.

Resolution

Please change name of Distributed Virtual Switch or Distributed Virtual Portgroup with following names: {dvSwitch, } to ensure unique names in each network folder before upgrade. Refer to VMwareKnowledge Base article 2147547 for more details.

 

 

vSphere 6.5 allows only unique names across all Distributed Virtual Switches and Distributed Virtual Portgroups in the same network folder. Earlier versions of vSphere allowed a Distributed Virtual Switch and a Distributed Virtual Portgroup to have the same name. If you attempt to upgrade from a version that allows duplicate names, the upgrade fails.

 

After logging to the VCSA over SSH or console, you can easily connect to the PostgreSQL server locally using psql:

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

List entries in the Distributed Virtual Portgroup table by running this command:

select id,dvportgroup_name from VPX_DVPORTGROUP;

List entries in the Distributed Virtual Switch table table by running this command:

select id,name from VPX_DVS;

 

List entries in the entities table table by running this command:

select id,name,parent_id from VPX_ENTITY;

Note: The parent_id for the conflicting Distributed Virtual Switch and Distributed Virtual Portgroup names. The same parent_id indicates the same network folder. Change only the duplicate names in the same network folder.

 

Detect duplicate names of Distributed Virtual Portgroups and Distributed Virtual Switches by running the following command:

select id,dvportgroup_name from VPX_DVPORTGROUP where dvportgroup_name in (select name from VPX_DVS group by name) AND dvportgroup_name in (select name from VPX_ENTITY group by name,parent_id having count(*) > 1);

 

 

In my case, I have 3 Distribuited Virtual Portgroup Duplicated

Rename Distributed Virtual Portgroups or Distributed Virtual Switches

  • Update the Distributed Virtual Portgroup table by running these commands:

    update VPX_DVPORTGROUP set dvportgroup_name=’dvSwitch_External 1′ where id=
    21402;

    update VPX_ENTITY set name=’dvSwitch_External 1′ where id=
    21402;

    update VPX_DVPORTGROUP set dvportgroup_name=’dvSwitch_Vmotion 1′ where id=
    20949;

    update VPX_ENTITY set name=’dvSwitch_Vmotion 1′ where id=
    20949;

    update VPX_DVPORTGROUP set dvportgroup_name=
    dvSwitch_Rete_2.X 1′ where id=
    21405;

    update VPX_ENTITY set name=’dvSwitch_Rete_2.X 1′ where id=
    21405;


    Note: After running each command, you will see the output as UPDATE 1.


You also could have the Distribuited Virtual Switch, you can update with this command

  • Update the Distributed Virtual Switchtable by running these commands:

    update VPX_DVS set name=’DSwitch 2′ where id=7;

    update VPX_ENTITY set name=’DSwitch 2′ where id=7;

    Note: After running each command, you will see the output as UPDATE 1.

Verify that there are no duplicate names in the same network folder

After you rename the Distributed Virtual Portgroups or Distributed Virtual Switch, verify that there are no duplicate names in the same network folder by running this command:

select id,dvportgroup_name from VPX_DVPORTGROUP where dvportgroup_name in (select name from VPX_DVS group by name) AND dvportgroup_name in (select name from VPX_ENTITY group by name,parent_id having count(*) > 1);

Now should be solved.

Leave a Reply

Your email address will not be published. Required fields are marked *