NSX Removal Fails on ESXi Host Due to Stale DVS Properties
search cancel

NSX Removal Fails on ESXi Host Due to Stale DVS Properties

book

Article ID: 440476

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware NSX

Issue/Introduction

  • NSX removal fails when executing nsxcli -c del nsx on an ESXi host. The script returns the following error:

    NSX removal is not successful. Failed to remove the host switches. Please check opsagent logs for more details.
  • Reviewing the nsxaVim.log reveals the following signature:

    INFO Nsx host properties remain in dvs [<REDACTED_UUID>]: ['com.vmware.net.portset.fc.enabled', 'com.vmware.net.portset.fc.mcast.enabled', 'com.vmware.nsx.vdsSecurity.enabled']
  • Executing net-dvs -l | egrep -i "com.vmware.net.portset.fc|nsx" shows that the properties remain set to true with propType = CONFIG and propType = RUNTIME on the DVS:

    com.vmware.common.portset.nsx = true ,  propType = CONFIG
    com.vmware.common.portset.nsx.async = true ,    propType = CONFIG
    com.vmware.common.nsxUplink =  ,        propType = CONFIG
    com.vmware.net.portset.fc.enabled = true ,      propType = RUNTIME
    com.vmware.net.portset.fc.mcast.enabled = true ,        propType = RUNTIME
    com.vmware.nsx.vdsSecurity.enabled = true ,     propType = CONFIG

Environment

  • VMware NSX

  • VMware ESXi

Cause

Stale NSX properties remained attached to the Distributed Virtual Switch (DVS) configuration on the ESXi host, which actively blocks the uninstallation script from removing the host switches.

Resolution

 

  • Verify the target ESXi host is in maintenance mode.

  • Establish an SSH session to the affected ESXi host.

  • Execute the following commands to manually remove the stale DVS properties from the affected host switches:

    • net-dvs -u com.vmware.nsx.vdsSecurity.enabled -p hostPropList <DVS_NAME>

    • net-dvs -u com.vmware.net.portset.fc.enabled -p hostPropList <DVS_NAME>

    • net-dvs -u com.vmware.net.portset.fc.mcast.enabled -p hostPropList <DVS_NAME>

  • Once the DVS properties are successfully removed, re-execute the NSX removal command: nsxcli -c del nsx

 

Additional Information