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. Select all cluster host nodes and select Remove NSX.
    Note: If Security 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.
  4. On the Remove NSX window, click Remove.
  5. 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'
  6. (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.
      Note: If you wish to perform the del nsx command without complying with the recommendations suggested, run nsxcli -c del nsx force.
    4. Read the warning message. Enter Yes if you want to go ahead with NSX uninstallation.
      PLEASE READ THE REQUIREMENTS AND LIMITATIONS OF THIS COMMAND CAREFULLY
      
      1. Read the NSX product documentation section for 'Uninstalling NSX from a Host Transport Node'.
      2. Use this command as a last resort, when attempts to delete this Transport Node via NSX UI or API have not been successful.
      3. Specific instructions for ESXi hosts:
      	a. The host must be in maintenance mode.
          b. All resources attached to NSX Portgroups must either be migrated to another host or migrated to a Standard Switch on the same host.
      	c. VLCM enabled hosts require a reboot to successfully remove the VIBs after executing del nsx.
      	d. For the command progress, please check '/var/log/nsxcli.log' on ESX hosts.
      Please confirm that you have carefully followed each of the instructions above. 
      Are you ready to proceed with executing the 'del nsx' command? (Y/N)
    5. NSX performs the following prechecks. An NSX admin is recommended to take action before the del nsx command is executed.
      Precheck Action to be taken by an NSX Admin
      Checks whether NSX uninstallation has been attempted from the NSX UI or API. Uninstall NSX from NSX Manager. If uninstallation is unsuccessful, enable the force delete option when uninstalling the transport node from the NSX Manager. Then, come back to the CLI and run the del nsx command.
      Checks whether host is disconnected from the NSX Manager. Ensure host is disconnected from the NSX Manager. The del nsx command will not be executed if there is an active connection between the host and NSX Manager.
      Checks whether host is in maintenance mode. Put the host in maintenance mode.
      Checks whether DVFilter is detected on hosts. Reboot the host to remove DVFilter and then retry the del nsx command.
      Checks whether resources are attached to NSX Portgroups on hosts. All resources attached to NSX Portgroups must either be migrated to another host or migrated to a Standard Switch on the same host.

      The execution of del nsx command initiates removal of VIBs. The deleted VIBs cannot be restored back to the system.

    6. If the host is SmartNIC-enabled or vLCM-enabled, reboot the host to completely remove the VIBs from the host.
    7. On the ESXi host, verify that the system message displayed is Terminated. This message indicates that NSX is completely removed from the host.
    8. To verify whether any NSX VIBs still remain on the host, run localcli software vib list | grep nsx. Check nsxcli.log and esxupdate.log for any failures.
    9. If you want to delete VIBs without complying to the recommendations suggested before running the del nsx command, you can remove NSX using the Force Delete option from the NSX Manager UI. Go to the ESXi host, select Force Delete and begin uninstallation. All existing host switches are removed and NSX VIBs are removed.
    10. As uninstallation has failed, try to gracefully delete NSX either from the NSX Manager UI or call API.
      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.
    11. If uninstallation fails again due to host disconnectivity from NSX Manager, repeat the procedure to remove NSX using the del nsx command.
    12. 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.