Deleting NSX VIBs from an ESXi host using "del nsx" fails with error: Unable to clear DVS propertycom.vmware.nsx.vdl2.enabled: Status(bad0004)= Busy
search cancel

Deleting NSX VIBs from an ESXi host using "del nsx" fails with error: Unable to clear DVS propertycom.vmware.nsx.vdl2.enabled: Status(bad0004)= Busy

book

Article ID: 322412

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • ESXi host may be in an orphaned state in the NSX manager.
  • The del nsx command on the ESXi host is not successful in removing NSX VIBs from the Transport Node.
  • ESXi CLI may show error: failed to remove host switches.
  • ESXi /var/run/log/nsxaVim.log may contain entries like below: 
nsxaVim: [2102769]: ERROR ApplyNsxDvsConfig on (## ## ## ## ## ## ## ##-## ## ## ## ## ## ## ##) failed: {'fault': 'PlatformConfigFault', 'msg': 'An error occurred during host configuration.', 'faultMessage': ['Operation failed, diagnostics report: Unable to clear DVS propertycom.vmware.nsx.vdl2.enabled: Status(bad0004)= Busy']}^@
nsxaVim: [2102769]: ERROR Failed to hot-swap cvds ['## ## ## ## ## ## ## ##-## ## ## ## ## ## ## ##']^@
nsxaVim: [2102769]: INFO HotSwapCvds result: Failed to hot-swap cvds ['## ## ## ## ## ## ## ##-## ## ## ## ## ## ## ##']ApplyNsxDvsConfig on (## ## ## ## ## ## ## ##-## ## ## ## ## ## ## ##) failed: {'fault': 'PlatformConfigFault', 'msg': 'An error occurred during host configuration.', 'faultMessage': ['Operation failed, diagnostics report: Unable to clear DVS propertycom.vmware.nsx.vdl2.enabled: Status(bad0004)= Busy']}^@
...
nsxaVim: [2102769]: INFO Invoking ApplyDvsList: dvsParams: ;reset=True;management;deleteTn=True | preDvsList: ['']
nsxaVim: [2102769]: INFO dvs to reset [[]]

Environment

  • VMware NSX 4.x
  • VMware NSX-T Data Center 3.x

Cause

An ESXi host cannot have NSX VIBs removed if NSX VTEP vmkernel interfaces are still present or virtual switches contain NSX properties.

Resolution


Workaround:

  1. Manually remove all VTEP vmkernel interfaces on the ESXi host:
    esxcli network ip interface remove --interface-name=vmk10
  2. Manually remove the VTEP, vdrPort and spfPort ports from the DVS:
    net-dvs -D -p <port uuid> <switch_name>     
    Sample command:
    net-dvs -D -p xxxxxxxx-9801-4fed-xxxxxxxxxxxx dvs-name
  3. To find the port used for the VTEP/vdrPort/spfPort , run the command:
    net-dvs -l
  4. Search the results for VTEP. The port should be listed just above the word VTEP. If there are multiple VTEPs, run the command from step 2 for each entry.
  5. Run del nsx again on the ESXi host.
  6. If it fails again, you can run the following command, to force the hot swap of the CVDS to DVS:
    ./usr/lib64/vmware/nsx-opsagent/bin/nsxcfg-vswitch -s
  7. Run del nsx again to complete the removal of NSX-T from the ESXi host.
  8. If it still fails, go to mob of the ESXi host by https://<esxi-host>/mob in a web browser and delete the VDS/NVDS containing the NSX properties.

Additional Information