Monday, November 22, 2010

How to properly uninstall the Nexus 1000v and unregister it from vCenter’s Plug-ins

The Nexus 1000v may look like your typical vCenter Distributed Switch but it’s definitely a lot more complicated to configure and even uninstall from vCenter. Since uninstalling it requires more than just using vCenter, this blog post serves to show how to uninstall the Nexus 1000v and unregister it from vCenter.

As some may already know, if you simply try to right click on the Nexus 1000v folder and click Remove, you’ll receive the error message:

“Cannot remove the object, since it has active related objects.”

image

image

Down below the task bar, you’ll see the entry:

image

So what now? The first thing you’ll need to do is remove the Nexus 1000v DVS from vCenter through either directly accessing the console or SSH-ing into the Nexus 1000v via putty or your preferred client. Here is a copy and paste of the commands I ran:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log =~=~=~=~=~=~=~=~=~=~=~=
login as: admin
User Access Verification
Using keyboard-interactive authentication.
Password:
Using keyboard-interactive authentication.
Cisco Nexus Operating System (NX-OS) Software
TAC support:
http://www.cisco.com/tac
Copyright (c) 2002-2010, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
youNexus1000vDVS# config t

youNexus1000vDVS(config)# svs connection vcenter

youNexus1000vDVS(config-svs-conn)# no vmware dvs

This will remove the DVS from the vCenter Server and any associated port-groups. Do you really want to proceed(yes/no)? [yes] yes

youNexus1000vDVS(config-svs-conn)# exit

youNexus1000vDVS(config)# exit

youNexus1000vDVS# exit

The following are explanations of what we’re doing:

youNexus1000vDVS# config t you need to get into config mode in order to execute the following commands

youNexus1000vDVS(config)# svs connection vcenter Once you’re in config mode, you can now enter the Nexus 1000v context

youNexus1000vDVS(config-svs-conn)# no vmware dvs Once you’re in the right context, you can issue the “no vmware dvs” to tell vCenter to remove the Nexus 1000v and it’s folder. If you look into vCenter, you can actually see this task execute:

image

This will remove the DVS from the vCenter Server and any associated port-groups. Do you really want to proceed(yes/no)? [yes] yes

Now that you’ve successfully remove the folder and the Nexus 1000v DVS from the Networking view, you can proceed with deleting the supervisor module virtual machines.

Note: If you delete the virtual machines prior to executing the commands above, you would have had to reinstall the Nexus 1000v with the same name.

image

Now that we’ve removed the virtual machines, all that’s left is to remove the plug-in reference from within vCenter:

image

Navigate to http://yourvCenter/mob/ (MOB = Managed Object Browser):

image

Click on the content link:

image

Click on ExtensionManager:

image

From where, you’ll see a list of extensions listed. You will need to determine which Nexus 1000v extension you want to remove which is identified by the string of numbers at the end. In my case, I wanted to remove the one with “465894910”.

image

Once you’ve identified the extension, click on the UnregisterExtension link at the bottom of the screen under the Methods heading:

image

Paste in a copy of the extension name:

image

Click on the Invoke Method link and you should see the message void which indicates the extension has been successfully unregistered.

image

If you’re logged into vCenter with VI Client, make sure you close the VI Client and log in again before you check the plug-in manager because the Nexus will still seemingly be registered until you close the VI Client.

Simple enough of everything goes well but it doesn’t always go as smoothly as shown here. :)

No comments: