VM reconfiguration and vmotion fails with error "A general system error occurred: Undeclared fault Cause: An error occurred during host configuration: Failed to attach all ports."
book
Article ID: 413703
calendar_today
Updated On:
Products
VMware NSX
Issue/Introduction
When attempting to power on new Virtual Machines (VMs) or relocate existing VMs in a VMware NSX-T environment, the operation fails.
When vMotion is attempted it fails with error "A general system error occurred: Undeclared fault Cause: An error occurred during host configuration: Failed to attach all ports."
When trying to reconfigure a virtual machine it fails with error "An error occurred during host configuration: Failed to attach VIF: bad0006.Failed to attach virtual network interface Unknown to logical switch 5bxxxxxx-9xx1-4xx1-8xxx-6xxxxxxxxxxf, message from NSX: bad0006"
When attempting to reconfigure/migrate VMs you may also observe error "Failed to add DVPort in vmkernel: status(bad=006) Limit exceeded while powering on the VM /relocation to this ESXi host after the reconfiguration."
Log lines similar to the below are encountered in /var/log/vpxa.log on the affected ESXi host:
2025-09-22T19:34:34.037Z info vpxa[17607500] [Originator@6876 sub=Default opID=432f752f-01-29] [VpxLRO] -- ERROR task-206115 -- vpxa -- vpxapi.VpxaService.registerVm: vim.fault.PlatformConfigFault: --> Result: --> (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 = "Failed to add DV Port in vmkernel: Status (bad0006)= Limit exceeded" --> } --> ], --> message = "Operation failed, diagnostics report: Failed to add DV Port in vmkernel: Status (bad0006)= Limit exceeded" --> } --> ], --> text = "" --> msg = "An error occurred during host configuration." --> }
Log lines in /var/log/nsxaVim.log or nsx-opsagent logs on the ESXi host might indicate errors during the resync.py script execution, such as:
2025-10-06T21:17:49Z In(14) nsxaVim: [44225008]: INFO [resync] resync.py: caught exception: {'fault': 'too many values to unpack (expected 2)'}^@
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.
Environment
VMware NSX
Cause
This issue occurs due to an accumulation of stale NSX-backed Distributed Virtual Switch (DVS) ports on ESXi hosts.
When VMs are frequently created and deleted, NSX-T is expected to clear associated logical ports. However, the resync.py script, which is responsible for the periodic cleanup of these stale dvPorts, fails to execute correctly.
Resolution
This issue is resolved in VMware NSX 4.2.x and later , available at Broadcom downloads.
If an immediate upgrade is not feasible, a workaround is available for affected ESXi hosts in earlier NSX-T versions.
Workaround:
If you are unable to upgrade to NSX-T 4.2.x or later, you can apply the following temporary workaround on the affected ESXi hosts to clean up stale ports.
Perform these steps on each affected ESXi host:
Put the ESX host in maintenance mode.
SSH to the ESX and download the modified resync.py script attached to this KB and move to /tmp/ directory on the host.