You can uninstall NSX-T Data Center from a single host that is managed by vCenter Server. The other hosts in the cluster are not affected.
Prerequisites
- In vCenter Server, put the hosts in maintenance mode and power off VMs running on the hosts if you want to migrate VMkernel adapters during uninstallation.
- 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.
Procedure
- From a browser, log in with admin privileges to an NSX Manager at https://<nsx-manager-ip-address>.
- Navigate the UI based on the NSX-T Data Center version and select a host:
- (NSX-T Data Center 3.2.2) System > Fabric > Hosts and select the Cluster tab.
-
(NSX-T Data Center 3.2.1 or earlier) System > Fabric > Nodes > Host Transport Nodes and from the Managed by dropdown menu, select a vCenter Server.
- If the cluster has a transport node profile applied, select the cluster, and click Actions > Detach TN Profile.
If the cluster has a transport node profile applied, the NSX Configuration column for the cluster displays the profile name.
- Select the host and click Remove NSX.
- Verify that the NSX-T Data Center software is removed from the host.
- Log into the host's command-line interface as root.
- Run this command to check for NSX-T Data Center VIBs
esxcli software vib list | grep -E 'nsx|vsipfwlib'
- 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.
- (Host on an N-VDS switch) If the host goes into a failed state and NSX-T Data Center VIBs cannot be removed, run the nsxcli -c del nsx command to remove NSX-T Data Center from the host.
- Before running the del nsx command, do the following:
- 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 vCenter Server 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.
- Disable SNMP on the ESXi host.
esxcli system snmp set --enable false
- Log in to the ESXi CLI terminal.
- Run nsxcli -c del nsx.
- Read the warning message. Enter Yes if you want to go ahead with NSX-T Data Center 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. If the above conditions for ESXi hosts are not met, the command WILL fail. 4. For command progress check /scratch/log/nsxcli.log on ESXi host or /var/log/nsxcli.log on non-ESXi host. Are you sure you want to remove NSX on this host? (yes/no)
Important: After running the del nsx command, do not use the Resolve functionality in the NSX Manager UI to re-prepare the host that is in Disconnected state . If you use the Resolve functionality, the host might go into Degraded state. - Verify that the existing VMkernel and physical NICs on the N-VDS switch are migrated to a new vSwitch. If there are more than one N-VDS switches on the host, each N-VDS switch is migrated to a separate vSwitch. For example, If there are N-VDS1, and N-VDS2 switches on the host, the VMkernel adapters and physical NICs are migrated to vSwitch1 and vSwitch 2.
- Select each host and click Remove NSX.
- In the popup window, select Force Delete and begin uninstallation.
- On the ESXi host, verify that system message displayed is Terminated. This message indicates that NSX-T Data Center is completely removed from the host.
After running del nsx, all existing host switches are removed, VMkernels and physical NICs are migrated to newly created vSwitches, transport node is detached from NSX Manager, and NSX-T Data Center VIBs are removed. If any NSX-T Data Center VIBs remain on the host, contact VMware support.
- Before running the del nsx command, do the following:
- (Host on a VDS 7.0 switch) If the host goes into failed state and NSX-T Data Center VIBs cannot be removed, run the nsxcli -c del nsx command to remove NSX from the host.
- Before running the del nsx command, do the following:
- 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 vCenter Server 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.
- Disable SNMP on the ESXi host.
esxcli system snmp set --enable false
- Log in to the ESXi CLI terminal.
- Run nsxcli -c del nsx.
- Read the warning message. Enter Yes if you want to go ahead with NSX-T Data Center 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. If the above conditions for ESXi hosts are not met, the command WILL fail. 4. For command progress check /scratch/log/nsxcli.log on ESXi host or /var/log/nsxcli.log on non-ESXi host. Are you sure you want to remove NSX on this host? (yes/no)
Important: After running the del nsx command, do not use the Resolve functionality in the NSX Manager UI to re-prepare the host that is in Disconnected state . If you use the Resolve functionality, the host might go into Degraded state. - Select each host and click Remove NSX.
- In the pop-up window, select Force Delete and begin uninstallation.
- On the ESXi host, verify that system message displayed is Terminated. This message indicates that NSX-T Data Center is completely removed from the host.
- All existing host switches are removed, transport node is detached from NSX Manager, and NSX-T Data Center VIBs are removed. If any NSX-T Data Center VIBs remain on the host, contact VMware support.
- 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.
- Before running the del nsx command, do the following: