The vSphere Distributed Switch configuration on some hosts differed from that of the vCenter server/var/log/vmware/vpxd/vpxd.log has the error, "Unable to set DVS vendor data com.vmware.nsx.ens.loadbal" for the problematic ESXi host after its reboot during host configuration YYYY-MM-DDTDD:MM:SSS.ABCZ info vpxd[05890] [Originator@6876 sub=vmomi.soapStub[821]] SOAP request returned HTTP failure; <<io_obj p:0x################, h:566, <UNIX ''>, <UNIX '/var/run/envoy-hgw/hgw-pipe'>>, /hgw/host-yyyyy/vpxa>, method: invokeHostTransactionCall; code: 500(Internal Server Error); fault: (vim.fault.DvsApplyOperationFault) {--> faultCause = (vmodl.MethodFault) null,--> faultMessage = <unset>,--> objectFault = (vim.fault.DvsApplyOperationFault.FaultOnObject) [--> (vim.fault.DvsApplyOperationFault.FaultOnObject) {--> objectId = "## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##",--> type = "vim.DistributedVirtualSwitch",--> fault = (vim.fault.PlatformConfigFault) {--> faultCause = (vmodl.MethodFault) null,--> faultMessage = (vmodl.LocalizableMessage) [--> (vmodl.LocalizableMessage) {--> key = "com.vmware.esx.hostctl.default",--> arg = (vmodl.KeyAnyValue) [--> (vmodl.KeyAnyValue) {--> key = "reason",--> value = "Unable to set DVS vendor data com.vmware.nsx.ens.loadbal: Status(bad0007)= Bad parameter"--> }--> ],--> message = "Operation failed, diagnostics report: Unable to set DVS vendor data com.vmware.nsx.ens.loadbal: Status(bad0007)= Bad parameter"--> }--> ],--> text = ""--> msg = "An error occurred during host configuration: ."
VMware ESXi 8.x
VMware NSX 4.x
The root cause is the presence of stale or inconsistent NSX metadata residing in the vCenter Database (VCDB). These legacy properties from previous versions are not automatically purged during the upgrade and remain mapped to the Distributed Switch. Upon host reboot, vCenter attempts to synchronize its database state to the host, reintroducing the inconsistent configuration.
The vCenter Database (VCDB) must be purged of these stale NSX entries to stop the re-synchronization of invalid metadata
To cleanup VCDB execute the attached Python script, nsx_cleanup.py.
Note :
After script execution, check if the sync error is not observed on VDS for the affected hosts on vCenter GUI. If required perform a read-only scan on vcenter to verify if any more cleanup is required.
If the issue persists even after VCDB clean up from vCenter Server appliance, raise a support ticket with Broadcom support selecting NSX as the product by following below KBs
Refer KB 312644 for more details on the script execution and commands to take vCenter backup.