To resolve this issue:
- Detect duplicate names of Distributed Virtual Portgroups and Distributed Virtual Switches.
- Rename Distributed Virtual Switches or Distributed Virtual Portgroups that have the same names before you upgrade.
- Verify that there are no duplicate names in the same network folder.
Detect duplicate names of Distributed Virtual Portgroups and Distributed Virtual Switches:
- Connect to the vCenter Server database. For more information, see Connecting to vPostgres Databases.
- List entries in the Distributed Virtual Portgroup table by running this command:
select id,dvportgroup_name from VPX_DVPORTGROUP;
For example:
select id,dvportgroup_name from VPX_DVPORTGROUP;
id | dvportgroup_name
----+------------------------
8 | DSwitch-DVUplinks-7
18 | DSwitch 1-DVUplinks-17
19 | DPortGroup 2
11 | DSwitch
9 | DSwitch 1
(5 rows)
- List entries in the Distributed Virtual Switch table table by running this command:
select id,name from VPX_DVS;
For example:
select id,name from VPX_DVS;
id | name
----+-----------
7 | DSwitch
17 | DSwitch 1
(2 rows)
- 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.
For example:
select id,name,parent_id from VPX_ENTITY;
id | name | parent_id
----+------------------------+-----------
1 | Datacenters |
2 | Datacenter | 1
3 | vm | 2
4 | host | 2
5 | datastore | 2
6 | network | 2
7 | DSwitch | 6
8 | DSwitch-DVUplinks-7 | 6
12 | Datacenter 1 | 1
13 | vm | 12
14 | host | 12
15 | datastore | 12
16 | network | 12
17 | DSwitch 1 | 16
18 | DSwitch 1-DVUplinks-17 | 16
19 | DPortGroup 2 | 16
11 | DSwitch | 6
9 | DSwitch 1 | 6
(18 rows)
- 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);
Example output:
id | dvportgroup_name
----+------------------
11 | DSwitch
(1 row)
Rename Distributed Virtual Portgroups or Distributed Virtual Switches
- Update the Distributed Virtual Portgroup table by running these commands:
update VPX_DVPORTGROUP set dvportgroup_name='DPortGroup 1' where id=11;
update VPX_ENTITY set name='DPortGroup 1' where id=11;
Note: After running each command, you will see the output as UPDATE 1.
- 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);
The output should be:
id | dvportgroup_name
----+------------------
(0 rows)