ApplyHostSwitchCpuConfig to [xxx-xxx-xxx] failed : Failed to reconfigure dvs:{'fault': 'PlatformConfigFault', 'msg': 'An error occurred during host configuration: ','faultMessage': ['Operation failed, diagnostics report: Unable to set the dvs extraConfig:Status(bad0007) = Bad parameter']} ;VMware NSX 4.X
The issue occurs when stale NSX properties remain in the ESXi host’s distributed switch configuration (e.g., kcp). These stale entries create a conflict during NSX re-preparation, preventing ESXi from installing the required properties and setting the correct switch type. As a result, the switch type defaults to the nulldev device, causing the operation to fail.
To resolve the issue, remove the stale entries before re-preparing the host from NSX
# net-dvs -l | grep "common.alias\|kcp.enable\|vdsSecurity.enabled"com.vmware.nsx.kcp.enable = true , propType = CONFIG
net-dvs -u com.vmware.nsx.kcp.enable -p hostPropList <dvsName>net-dvs -u com.vmware.nsx.vdsSecurity.enabled -p hostPropList <dvsname>
dvsName> is in output of command run in step 2.To workaround the issue