Cannot remove orphaned portgroup from vCenter Server after Cisco Nexus 1000V is removed
search cancel

Cannot remove orphaned portgroup from vCenter Server after Cisco Nexus 1000V is removed

book

Article ID: 324557

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • After removing a Nexus 1000V Virtual Distributed Switch (VDS), a portgroup created by the Cisco VDS is still present in vCenter Server and cannot be removed.
  • When you attempt to remove the orphaned portgroup, you receive an error stating that the portgroup is still in use.


Environment

VMware vSphere ESXi 5.0
VMware vCenter Server 5.1.x
VMware vCenter Server 5.5.x
VMware vCenter Server 5.0.x
VMware vSphere ESXi 5.1
VMware vSphere ESXi 6.0
VMware vCenter Server 6.0.x
VMware vSphere ESXi 5.5

Resolution

To resolve this issue, manually remove the database entries for this portgroup from the vCenter Server database.

To manually remove the database entries:
  1. Stop the VMware vCenter Server service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
  2. Take a backup of vCenter Server database. For more information, see Backing up the vCenter Server database running on Microsoft SQL or SQL Express server (2012138).
  3. Run these queries against the vCenter Server SQL database to remove the orphaned portgroup:
     
    1. SELECT * FROM VPX_ENTITY WHERE NAME = 'PortGroup_Name';

      Where PortGroup_Name is the name of the portgroup you are trying to remove.

      The output returns a numeric value in the ID column: PG_ID. Make note of this value for use in the next step.
       
    2. DELETE FROM VPX_ENTITY WHERE ID = 'PG_ID';

      Where PG_ID is the value returned in the previous step.
       
    3. SELECT * FROM VPX_DVPORTGROUP WHERE DVPORTGROUP_NAME = 'PortGroup_Name';

      Where PortGroup_Name is the name of the portgroup you are trying to remove.

      The output returns a numeric value in the ID column: DVPG_ID. Make note of this value for use in the next step.
       
    4. DELETE * FROM VPX_DVPORTGROUP WHERE ID = 'DVPG_ID';

      Where DVPG_ID is the value returned in the previous step.
    5. Restart the VMware vCenter Server service. For more information, see Stopping, starting, or restarting vCenter services (1003895).


Additional Information



How to stop, start, or restart vCenter Server services
Backing up the vCenter Server database running on Microsoft SQL or SQL Express server