Remove Stale NSX Segments from vCenter Network Inventory
search cancel

Remove Stale NSX Segments from vCenter Network Inventory

book

Article ID: 369037

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Symptoms:

  • NSX Segment is showing under the vCenter Network Inventory
  • Validated NSX Segment is unable to be found from within the NSX UI
  • Validated the NSX Segment is not showing up when running the following API Call - "GET https://nsxManager_Ip/api/v1/logical-ports"

Environment

VMware NSX-T

VMware vCenter Server

Resolution

If it is confirmed the NSX Segment is stale in the vCenter Network Inventory, please proceed with the following steps:

Note: It is advised to take a backup of the vCenter before proceeding with the following steps:

  1. Identify the dvs-ID by selecting the DVS in which the Segment is a part of and view the ID from the Browser URL.
  2. Identify the dvportgroup-id by selecting the Stale NSX Segment from the vCenter Network Inventory and grabbing the ID from the Browser URL
  3. Login to vCenter Server MOB by going to the following URL:

    https://vCenter_FQDN/mob/?moid=dvs-##&method=removeNsxPortgroups
    dvs-## was found in step 1.
  4.  Copy and paste the following snippet into the parameters field to remove the specific dvportgroup-id:

<portgroupKey>dvportgroup-##</portgroupKey>
dvportgroup-id was found in step 2.

Note: There is no impact to the vCenter when running these MOB commands. No vCenter or NSX restarts are required as a result. 

Example Screenshots:

DVS ID:

dvportgroup-id: