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

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

Prerequisites

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

Procedure

  1. In the NSX Manager, select Fabric > Nodes > Transport Nodes and delete the host transport nodes.

    Deleting the transport node causes the N-VDS 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
  2. In the NSX Manager CLI, verify that the NSX-T Data Center install-upgrade service is running.
    nsx-manager-1> get service install-upgrade
    Service name: install-upgrade
    Service state: running
    Enabled: True
  3. Uninstall the host from the management plane and remove the NSX-T Data Center modules.

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

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

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

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

      Remove the RHEL 7.4 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.

    • (Hosts managed by a compute manger) In the NSX Manager, select Fabric > Nodes > Hosts > Transport Nodes > Delete Host.

      In the NSX Manager, select Fabric > Nodes > Hosts > Compute Manager > Configure Cluster Manager and uncheck Automatically Install NSX. Select node and click Uninstall NSX.

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

    • 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.4 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 Data Center 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 or migrate them to another host.

      6. Manually uninstall the NSX-T Data Center 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-aggservice -n nsx-cli-libs -n nsx-common-libs -n nsx-da -n nsx-esx-datapath -n nsx-exporter -n nsx-host -n nsx-metrics-libs -n nsx-mpa -n nsx-nestdb-libs -n nsx-nestdb -n nsx-netcpa -n nsx-opsagent -n nsx-platform-client -n nsx-profiling-libs -n nsx-proxy -n nsx-python-gevent -n nsx-python-greenlet -n nsx-python-logging -n nsx-python-protobuf -n nsx-rpc-libs -n nsx-sfhc -n nsx-shared-libs -n nsxcli
    • On RHEL 7.4, 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 Data Center overlay.

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