NSX-T "del nsx" command fails with exception when deleting nsx from ESXi host
search cancel

NSX-T "del nsx" command fails with exception when deleting nsx from ESXi host

book

Article ID: 317761

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • NSX-T Data Center version 3.X.X.
  • NSX-T is being uninstalled from Host Transport Node using the command 'del nsx'.
  • Uninstallation fails with error message similar to:

% Exception when deleting nsx from host: ' 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: Thu Mar 24 2022 UTC 10:08:06.532 ERROR: Failed to reset nsxa app of nsx-opsagent. Please check ospagent logs for more details.'

  • In ESXi host's vmkernel.log file (/scratch/log/vmkernel.log), you may observe logs similar to:

2022-03-24T10:09:07Z nsxaVim: [2102480]: WARNING NSX properties in VDS [xx 37 ## fa ## 16 ## 33-c2 ## 27 ## 17 ## 13 ##] are not removed by cfgAgent yet.^@

2022-03-24T10:09:07Z nsxaVim: [2102480]: ERROR Failed to hot-swap cvds ['xx 37 ## fa ## 16 ## 33-c2 ## 27 ## 17 ## 13 ##']^@

2022-03-24T10:09:07Z nsxaVim: [2102480]: INFO HotSwapCvds result: Failed to hot-swap cvds ['xx 37 ## fa ## 16 ## 33-c2 ## 27 ## 17 ## 13 ##']^@

 

Environment

VMware NSX-T Data Center 3.x

Cause

This is a known issue, impacting NSX-T Data Center version below 4.x.x.

Resolution

This issue is resolved in NSX-T Data Center 3.2.0 available at Download Broadcom products and software.


Workaround:

  1. Make sure the host is removed from NSX Manager first by running "Force delete" on the host (System - Fabric - Nodes - Host Transport Nodes) through the NSX-T UI.
  2. Clear properties on all unused logical switches, run the following command on the ESXi host(s) impacted:
/usr/lib64/vmware/nsx-opsagent/bin/nsxcfg-vswitch -s
  • Ensure host is in maintenance mode
  • Stop NSX proxy
    /etc/init.d/nsx-proxy stop
  • Stop SNMP
    esxcli system snmp set --enable false
  • Delete NSX
    nsxcli -c del nsx



Additional Information