Cisco Nexus 1000v and vSphere VEM Manual Uninstall
I found the need when troubleshooting a few days ago to manually remove the Cisco 1000v VEM from a host. The distributed virtual switch (1000v) was not functioning correctly on this individal machine. Here I will go through the process of doing so form the command line
Fist, SSH to the ESX (vSphere) host.
Make sure that the VEM is listed on this server.
[root@vm09 ~]# esxupdate --vib-view query | grep cisco cross_cisco-vem-v121-esx_4.0.4.1.3.1.0-1.20.2 installed 2010-08-10T15:41:37.946711-04:00
Next, the server will have to be removed from the 1000v switch in Virtual Center. To do this, all VMs that has a nic on the 1000v switch will have to be migrated off.
To remove the host from the switch, navigate to the following.
Home -> Inventory -> Networking -> select your 1000v switch -> Host tab
From there, right-click the ESX host and tell it to “Remove from Distributed Virtual Switch”
Go back to the CLI. This is actually easy enough, just use the vem-remove command. Below is the help information from the command.
[root@vm09 ~]# vem-remove -h
vem-remove [options]
Options:
-c Remove /usr/lib/ext/cisco and modules from visor system
-d Developer removal option
-h Help
-r Remove VIBs
-s Stop DPA and unload modules before removing
-v Verbose
-u Cleanup stale dvs information
-z Dry run (don't really remove)
Per the cisco documentation, the “-d” option was used.
[root@vm09 ~]# vem-remove -d watchdog-vemdpa: Terminating watchdog with PID 1551 Removing CIsco VEM VIB from COS system Removing VIB cross_cisco-vem-v121-esx_4.0.4.1.3.1.0-1.20.2 Removing cisco-vem-v121-esx ############## [100%] Running [/usr/sbin/vmkmod-install.sh]... ok.
Re-query esxupdate and the VEM should now be in the “retired” status.
[root@vm09 ~]# esxupdate --vib-view query | grep cisco cross_cisco-vem-v121-esx_4.0.4.1.3.1.0-1.20.2 retired 2010-08-10T15:41:37.946711-04:00
The re-install of the VEM is easy enough through Virtual Center. I always reboot the host before, then once it is back in Virtual Center, add the host back to the 1000v Distributed Virtual Switch. In the proccess of adding it back, VC will re-load the VEM and reconfigure the networking on the host. Once done, you now have 1000v VEM re-installed on the host.

Did you need to create a std vswitch and migrate a physical NIC and the service console connection to it in order to maintain your ssh session?
eprich said this on August 13, 2010 at 9:17 am
[...] This post was mentioned on Twitter by Kevin Goodman, Joe Onisick. Joe Onisick said: RT @colovirt: #Cisco Nexus 1000v and vSphere VEM Manual Uninstall – http://wp.me/pm3nc-fl < That process is not well documented, great post! [...]
Tweets that mention Cisco Nexus 1000v and vSphere VEM Manual Uninstall « Colocation to Virtualization -- Topsy.com said this on August 13, 2010 at 9:29 am
In most cases you would, but in our environment we have 4 total 10gbE uplinks per host. We keep the first 2 NICs configured as a standard vSwitch. Management access stays there. All other traffic goes through the other 2 ports in the 1000v
Kevin Goodman said this on August 13, 2010 at 10:17 am
Just a note guys, hopefully this can help others. With ESXi it is more difficult to access the CLI to run the VEM commands, you need to go into the unsupported CLI to do so. The other way that I came up with to reinstall the VEM without going into the CLI was to remove the host from the DVS, use VUM to downgrade to a lower version of VEM, then add the host back into the DVS. VUM automatically upgrade the VEM back up to the right version and it showed up right away on the 1000v.
Tho said this on September 13, 2010 at 1:53 pm
Hi guys. Interesting post. To answer eprich’s question: What I found most guides on removing host from 1000v missing was how to remove the management network from the distributed switch. So, you have to go to the hosts networking configuration, choose vNetwork Distributed switch, then Manage Virtual adapters. Select the vmkernels and click Migrate to virtual Switch, then choose your standard switch. After that you will be able to successfully remove the host from 1000v without any warnings or errors.
Nick said this on January 28, 2011 at 5:21 am