Remove Orphaned Nexus 1000v DVS from vCenter

While deploying the Nexus 1000v DVS in one of my environments I ran into an issue where I had to create a new standby VSM. To do so I built a new standalone VSM, which connected to vCenter and had a switch name of dvs-test. I converted the standalone VSM to an HA-secondary VSM in the same domain ID as the primary and was good to go, or at least I thought I was.

While I had successfully deployed a new secondary VSM and had it operating in the HA pair, I still had this dvs-test DVS in my vCenter inventory, and I couldn’t get rid of it. A quick google search brought me to an article written back in 2010 by Frank Denneman, which you can find here, but I wanted to document the process in a more granular way. Below is the process I used, with steps to deploying a new temporary VSM and screenshots for the folks that don’t like to read. Thanks to Frank for laying out the basic on his blog.

For the example below we are removing an orphaned 1000v DVS with a name of dvs-test

Deploy a temporary VSM

  • Launch the vSphere client and login
  • Deploy an OVF template and browse to the location where you have the VSM install. If you have the VSM folder it should be located at:
    • Nexus1000v…\VSM\Install\nexus-1000v.4.2.1.SV2.1.1a –File name may be different depending on version
  • Choose the Nexus 1000V Secondary option


  • Choose a network location for the control, management and packet networks. You can use the same network since this is temporary
  • Enter in a domain ID — If you already have a 1000v installed choose a different domain ID
  • Enter in a password and set the IP/Subnet Mask and default gateway
  • Once the OVF has been deployed power on the VM
  • Once it is booted up, login and enter the following commands:
[sourcecode language=”powershell” padlinenumbers=”true”] conf t
hostname dvs-test <— This is the name of the orphaned switch you are trying to remove
interface mgmt0
ip address <ip address>/<prefix>
vrf context management
ip route <ip for gateway>
copy run start

  • Close the console and SSH into the VSM

Remove Orphaned 1000v

  • Get the VC extension ID for the orphaned DVS by doing the following:
  • Log in to the vSphere client and navigate to the networking view (View > Inventory > Networking)
    • Find the dvs-test switch and select it from the inventory tree
    • Find the extenstion ID for the switch by looking at the Annotations pane


    • Copy the ID to notepad or some other place
  • Go back to the SSH session of the VSM and type the following commands:
[sourcecode language=”powershell”] conf t
vmware vc extension-key <extension-id> — this is what you copied earlier
copy run start

vmware vc extension-key Cisco_Nexus_1000V_319338687




  • Go and delete the extension-key from the MOB
    • Open a web browser and navigate to

                             https://<VC IP>/mob/?moid=ExtensionManager

    • Find extension labeled Cisco_Nexus_1000v_<extenstion id> and copy it


    • Under Methods, click the UnregisterExtension hyperlink


    • Paste in the extension-key you copied in the previous step and click the Invoke Method hyperlink. It should return a result of void


  • Open a web browser and navigate to the IP of the temporary VSM
  • Right-click the cisco_nexus_1000v_extension.xml hyperlink and save it somewhere on your machine


  • Launch the vSphere client and login
  • Click the Plug-ins menu and select Manage Plug-ins…


  • Right-click anywhere in the Plug-in Manager window where there is white space and click New Plug-in…


  • Browse and open the XML file you just downloaded and click the Regsiter Plug-in button


  • If you get a certificate warning click Ignore
  • Click OK to the success messageand close the Plug-in Manager
  • Go back to the console and type in the following commands
[sourcecode language=”powershell”] conf t
svs connection vcenter
remote ip address <ip of vcenter>
protocol vmware-vum
vmware dvs datacenter-name <datacenter name>
no vmware dvs
  • Press enter to confirm (default choice is yes)


You will also see the “dvs-test” switch being deleted from vCenter from within the vSphere client, specifically in the Recent Tasks pane



  • Now you can power off and delete the temporary VSM
  • Go back into the extension manager (like you did earlier) and remove the extension you added for the temporary VSM

Comments 2

Leave a Reply to zox Cancel reply

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