If you have installed NSX on a vSphere Cluster using transport node profiles, you can follow these instructions to uninstall NSX from all hosts in the cluster.

For more information on transport node profiles, see Add a Transport Node Profile.

If you have not used a transport node profile to install NSX, or if you want to remove NSX from a subset of the hosts in the cluster, see Uninstall NSX from a Managed Host in a vSphere Cluster.

Note: Follow these instructions to uninstall NSX from a host in a cluster: Uninstall NSX from a Managed Host in a vSphere Cluster.

Prerequisites

  • Ensure there are no VIF ports associated with hosts.

Procedure

  1. From a browser, log in with admin privileges to an NSX Manager at https://<nsx-manager-ip-address> or https://<nsx-manager-fqdn>.
  2. Select System > Fabric > Hosts.
  3. On the Cluster tab, select a cluster, click Actions menu and select Detach Transport Node Profile.
  4. Select all cluster host nodes and select Remove NSX.
    Note: If NSX Intelligence is also deployed on the host, NSX uninstallation fails because all transport nodes become part of a default network security group. To successfully uninstall NSX, you also need to select the Force Delete option before proceeding with uninstallation.
  5. On the Remove NSX window, click Remove.
  6. Verify that the NSX software is removed from the host.
    1. Log into the host's command-line interface as root.
    2. Run this command to check for NSX VIBs
      esxcli software vib list | grep -E 'nsx|vsipfwlib'
  7. (IPv4 only or IPv4 and IPv6 stack) If the host goes into failed state and NSX VIBs cannot be removed, then run the nsxcli -c del nsx command to remove NSX from the host.
    1. Before running the del nsx command, perform the following steps:
      • If there are VMkernel adapters on NSX port groups on the VDS switch, you must manually migrate or remove vmks from NSX port group to DV port groups on the VDS switch. If there are any vmks available on the NSX port groups, del nsx command execution fails.
      • Put the ESXi host in maintenance mode. The VMware vCenter does not allow the host to be put in maintenance mode unless all running VMs on the host are in powered off state or moved to a different host.
      • Permanently disconnect the ESXi host transport node from NSX Manager by stopping nsx-proxy service running on the ESX host transport node. Log in to the ESXi CLI terminal and run /etc/init.d/nsx-proxy stop.
      • Refresh the NSX Manager UI.
      • Verify that the state of the ESXi host transport node is Disconnected from NSX Manager.
    2. Log in to the ESXi CLI terminal.
    3. Run nsxcli -c del nsx.
    4. Read the warning message. Enter Yes if you want to go ahead with NSX uninstallation.
      Carefully read the requirements and limitations of this command:
      1. Read NSX documentation for 'Remove a Host from NSX or Uninstall NSX Completely'.
      2. Deletion of this Transport Node from the NSX UI or API failed, and this is the last resort.
      3. If this is an ESXi host:
              a. The host must be in maintenance mode.
              b. All resources attached to NSXPGs must be moved out.
              c. If this is a SmartNIC-enabled host, the host must be rebooted after vib removal is completed. Verify this by checking /var/run/log/esxupdate.log for the thread which shows nsx-lcp component removal and confirm it completed without error. It will look something like:
      
                      In(14) esxupdate[2150621]: Starting runnable component remove -n nsx-lcp-bundle:4.1.1.0.0-8.0.21958016 with 6e3446d0-8393-5869-8873-076a95930f56
                      ...
                      Db(15) esxupdate[2150621]:  Finished execution of command = component.remove
      If the above conditions for ESXi hosts are not met, the command WILL fail.
      4. If this is a Linux host:
              a. If KVM is managing VM tenants then shut them down before running this command.
              b. This command should be run from the host console and may fail if run from an SSH client
                 or any other network based shell client.
              c. The 'nsxcli -c del nsx' form of this command is not supported
      5. If this is a Windows host:
              NOTE: This will completely remove all NSX instances (image and config) from the host.
      6. For command progress check /scratch/log/nsxcli.log on ESXi host or /var/log/nsxcli.log on Linux host or 'c:/Programdata/VMware/NSX/Logs/nsxcli.log' on Windows host.
      Are you sure you want to remove NSX on this host? (yes/no) yes
      Important: After running the del nsx command, do not use the Resolve functionality in the NSX Manager UI to reprepare the host that is in Disconnected state . If you use the Resolve functionality, the host might go into Degraded state.
    5. On the ESXi host, verify that the system message displayed is Terminated. This message indicates that NSX is completely removed from the host.
    6. On a SmartNIC-enabled host, reboot the host once the command removes all required vibs.
    7. Go to the ESXi host, select Force Delete and begin uninstallation. All existing host switches are removed, transport node is detached from NSX Manager, and NSX VIBs are removed.
    8. To verify whether any NSX VIBs still remain on the host, run esxcli software vib list | grep -E 'nsx|vsipfwlib'. If you find any VIBs on the host, it means that del nsx has failed. When you executed the command, the host connectivity with NSX might have come up.
    9. As uninstallation has failed, try to gracefully delete NSX either from the NSX Manager UI or call API.
    10. If uninstallation fails again due to host disconnectivity from NSX Manager, repeat the procedure to remove NSX using the del nsx command.
    11. If uninstallation is still unsuccessfull, contact VMware support.

Results

NSX objects and all related services are completely removed from the host. However, if you applied the predefined or a custom high-performance switch profile to a cluster, NSX retains these profile properties on cluster hosts after uninstallation. For more information, see the Configure High-Performance Host Switch Profiles topic in the NSX Administration Guide.