Walkthroughs

How to Manually Remove VMware NSX-T Components from an ESXi Host

A lab is very dynamic by nature. In stark contrast, data center infrastructure is engineered to be as static as possible once it is configured. So naturally when you have a data center lab you it’s only a matter of time before you come across weird anomalies just from the act of constantly making configuration changes, version updates, bringing systems online, taking systems offline… you get the picture.

I switched NSX network virtualization versions so many times that weird artifacts like N-VDS switches would not go away even when deleted. As I poked around the esxi hosts from a shell I even saw remnants of NSX-V which I deleted years ago! It was time to clear out all of my vSphere hosts of all things NSX.

So my specific situation is that my NSX-T unified manager failed along with many edge nodes. I was not able to uninstall from the NSX-T user interface. Instead I logged into each ESXi host individually and did the following:

Its actually quite easy.

  1. SSH into your first host.
  2. Put the host in maintenance mode.
  3. List all NSX, NSX-T related files with this command.
    • esxcli software vib list | grep -E 'nsx|vsipfwlib'
  4. If there are still any VMs attached to any NSX networks, detach them in vcenter.
  5. Delete all NSX or NSX-T packages and files with this command
    • nsxcli -c del nsx
  6. A warning will pop up asking that you check to make sure no NSX networks are still attached to a vm & maintenance mode.
  7. type yes and hit return.
  8. after about 30 seconds all NSX networks are gone from the host and if you re-run the command in step 3 nothing will show up.
  9. ***NOTE you may have to wait another minute for all of the packages to be removed before running the command in step 3 again.

You will have to log into each of your hosts one by one and repeat this process, but it does work cleanly.

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.