You can uninstall NSX from a single host that is managed by VMware vCenter. The other hosts in the cluster are not affected.

Prerequisites

  • On an ESXi host that is put into Locked state, ensure that the root user is added to the exception list, so that an SSH session can be established with the host.
  • 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.
  4. If the cluster has a transport node profile applied, select the cluster, and click Actions > Detach Transport Node Profile.
    If the cluster has a transport node profile applied, the NSX Configuration column for the cluster displays the profile name.
  5. Select the host and click Remove NSX.
  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. If a Transport Node Profile is applied to the cluster, and you want to reapply it, select the cluster, click Configure NSX, and select the profile from the Select Deployment Profile drop-down menu.
  8. (IPv4 only or IPv4 and IPv6 stack) Assume the host on a VDS 7.0 switch. 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 a predefined or a custom high-performance switch profile to individual transport nodes, NSX retains these profile properties on hosts after uninstallation. For more information, see the Configure High-Performance Host Switch Profiles topic in the NSX Administration Guide.

On a host part of a vSphere Lifecycle Manager, after you perform del nsx and Remove NSX from NSX Manager, the host status in vCenter Server is compliant with the cluster image. The system displays, All hosts in the cluster are compliant.