- When you run 'del nsx' on the nsxcli of the ESXi host to uninstall NSX, causing the opsagent to not run and uninstall wont be completed with following error:
33937680 cli.commands.host_shared.register WARNING Error in 'nsx environment delete'. error code: 4 stdout: delete_nsx_instance_from_host.sh: INFO: NSX reset script called with argument fabric_node on nsx-esx delete_nsx_instance_from_host.sh: INFO: Run transport_node reset on ESX node % Failed to remove all host switches or logical switches delete_nsx_instance_from_host.sh: ERROR: Failed to reset nsxa app of nsx-opsagent. Please check ospagent logs for more details. stderr: ERROR: Failed to reset nsxa app of nsx-opsagent. Please check ospagent logs for more details.
- This happens when ESXi host is on 7.0.3 but NSX VIBs are installed for 6.7 version
nsx-nestdb 3.1.1.0.0-6.7.17483060 VMware VMwareCertified
nsx-netopa 3.1.1.0.0-6.7.17483060 VMware VMwareCertified
nsx-opsagent 3.1.1.0.0-6.7.17483060 VMware VMwareCertified
VMware NSX-T Data Center
VMware vSphere ESXi 7.0.3
Since there is a mismatch in versions (ESXi version with NSX VIB version), nsxcli (del nsx) will not work in this case
Workaround:
1. Prepare the Host
Log in to the ESXi host web interface (https://<ESXi_IP>/ui).
Navigate to Manage in the left-hand navigator.
Click the System tab and then select Advanced settings.
Search for Config.HostAgent.plugins.solo.enableMob.
Right-click the setting and select Edit option, or click the Edit button, and set the value to true.
2. Delete Active NSX Ports (VTEPs and Logical Ports):
3. Remove the N-VDS via MOB.
*Since the CLI might fail to delete a "busy" switch, use the Host MOB to force the removal:
4. Manually Remove NSX VIBs.
*Run the following commands in sequence to remove the software packages:
esxcli software vib remove -n=nsx-adf -n=nsx-context-mux -n=nsx-exporter -n=nsx-host -n=nsx-monitoring -n=nsx-netopa -n=nsx-opsagent -n=nsx-proxy -n=nsx-python-logging -n=nsx-python-utils -n=nsxcli -n=nsx-sfhc -n=nsx-platform-client -n=nsx-cfgagent -n=nsx-mpa -n=nsx-nestdb -n=nsx-python-gevent -n=nsx-python-greenlet -n=nsx-python-protobuf -n=nsx-vdpi -n=nsx-idsesxcli software vib remove -n=nsx-esx-datapath --no-live-installesxcli software vib remove -n=vsipfwlib -n=nsx-cpp-libs -n=nsx-proto2-libs -n=nsx-shared-libs5. Finalize