If you want to uninstall NSX-T completely or just remove a hypervisor host from NSX-T so that the host can no longer take part in the NSX-T overlay, follow these steps.

About this task

The following procedure describes how to perform a clean uninstall of NSX-T.

Prerequisites

If the VM management tool is vCenter Server, put the vSphere host in maintenance mode.

Procedure

  1. In your VM management tool, detach all VMs on the host from any NSX-T logical switches.
  2. In the NSX Manager, delete the host transport node with the Fabric > Nodes > Transport Nodes UI or with the DELETE /api/v1/transport-node/<node-id> API.

    Deleting the transport node causes the NSX-T hostswitch to be removed from the host. You can confirm this by running the following command.

    [root@host:~] esxcli network vswitch dvs vmware list

    On KVM, the command is:

    ovs-vsctl show
  3. In the NSX Manager CLI, verify that the NSX-T install-upgrade service is running.
    nsx-manager-1> get service install-upgrade
    Service name: install-upgrade
    Service state: running
    Enabled: True
  4. Uninstall the host from the management plane and remove the NSX-T modules.

    It might take up to 5 minutes for all NSX-T modules to be removed.

    There are several methods you can use to remove the NSX-T modules:

    • In the NSX Manager, select Fabric > Nodes > Hosts > Delete.

      Make sure Uninstall NSX Components is checked. This causes the NSX-T modules to be uninstalled on the host.

      Remove the RHEL 7.3 dependency packages - json_spirit, python-greenlet, libev, protobuf, leveldb, python-gevent, python-simplejson, glog.

      Remove the Ubuntu 16.04.x dependency packages - nicira-ovs-hypervisor-node, openvswitch-switch, openvswitch-datapath-dkms, openvswitch-pki, python-openvswitch, openvswitch-common, libjson-spirit.

      Note that using Fabric > Nodes > Hosts > Delete with the Uninstall NSX Components option unchecked is not meant to be used to unregister a host. It is only meant as a workaround for hosts that are in a bad state.

    • Use the DELETE /api/v1/fabric/nodes/<node-id> API.

      Note:

      This API does not remove the dependency packages from the nsx-lcp bundle.

      Remove the RHEL 7.3 dependency packages - json_spirit, python-greenlet, libev, protobuf, leveldb, python-gevent, python-simplejson, glog.

      Remove the Ubuntu 16.04.x dependency packages - nicira-ovs-hypervisor-node, openvswitch-switch, openvswitch-datapath-dkms, openvswitch-pki, python-openvswitch, openvswitch-common, libjson-spirit.

    • Use the CLI for vSphere.

      1. Get the manager thumbprint.

        manager> get certificate api thumbprint
      2. On the host's NSX-T CLI, run the following command to detach the host from the management plane.

        host> detach management-plane <MANAGER> username <ADMIN-USER> password <ADMIN-PASSWORD> thumbprint <MANAGER-THUMBPRINT>
      3. On the host, run the following command to remove filters.

        [root@host:~] vsipioctl clearallfilters
      4. On the host, run the following command to stop netcpa.

        [root@host:~] /etc/init.d/netcpad stop
      5. Power off the VMs on the host.

      6. Manually uninstall the NSX-T modules from the host.

        Note that removing individual modules is not supported. You must remove all modules in one command.

        esxcli software vib remove -n nsx-shared-libs -n nsx-common-libs -n nsx-metrics-libs -n nsx-rpc-libs -n nsx-nestdb-libs -n nsxa -n nsx-lldp -n nsx-da -n nsx-exporter -n nsx-aggservice -n nsxcli -n nsx-python-protobuf -n nsx-sfhc -n nsx-netcpa -n nsx-mpa -n nsx-esx-datapath -n nsx-host -n nsx-support-bundle-client -n nsx-nestdb -n nsx-platform-client -n nsx-hyperbus
    • On RHEL 7.3, use the sudo yum remove nsx* <package-name> command.

      Remove the dependency packages, glog, json_spirit, kmod-openvsiwth, nicira-ovs-hypervisor-node, openvswitch, openvswitch-selinux-policy, python-simplejson

    • On Ubuntu 16.04.x, use the apt-get remove "nsx*" <package-name> command.

      Remove the dependency packages, nicira-ovs-hypervisor-node, openvswitch-switch, openvswitch-datapath-dkms, openvswitch-pki, python-openvswitch, openvswitch-common, libjson-spirit

What to do next

After making this change, the host is removed from the management plane and can no longer take part in the NSX-T overlay.

If you are removing NSX-T completely, in your VM management tool, shut down NSX Manager, NSX Controllers, and NSX Edges and delete them from the disk.