The error "The object or item referred to could not be found" combined with "vDS dvs port ##### cannot be found" during a VM migration in vCenter 7.x and 8.x, typically indicates a mismatch or inconsistency between the distributed virtual switch (vDS) port configuration on the ESXi host and the vCenter Server database.
Error:
ESXi Logs:
var/run/log/hostd.log
[YYYY-MM-DDTHH:MM:SS] verbose hostd[2101185] [Originator@6876 sub=Solo. Vmomi opID=xxxxxxxx-xxxx user=vpxuser] Arg portSpec:-- > (vim.dvs. HostDistributedvirtualswitchManager. PortDeleteSpec) [-- > (vim. dvs. HostDistributedVirtualSwitchManager. PortDeleteSpec) {-- > portKey = "#####",-- > deletePortFile = true,-- > systemCleanup = true-- >-- > ][YYYY-MM-DDTHH:MM:SS] info hostd[2101185] [Originator@6876 sub=Solo. Vmomi opID=xxxxxxxx-xxxx user=vpxuser] Throw vim. fault. PlatformConfigFa1t[YYYY-MM-DDTHH:MM:SS] info hostd[2101185] [Originator@6876 sub=Solo. Vmomi opID=xxxxxxxx-xxxx user=vpxuser] Result:-- > (vim. fault. PlatformConfigFault) {-- > faultMessage = (vmodl. LocalizableMessage) [-- > (vmodl. LocalizableMessage) {-- > key = "com. vmware. esx. hostctl.default",-- > arg = (vmodl. KeyAnyValue) [-- > (vmodl.KeyAnyValue) {-- > key = "reason",-- > value = "Unable to delete DVPort "" that is in use, use list: VM-Name.eth0"-- > }-- > ],-- > }-- > ],-- > text = "",-- > msg = ""-> }
This issue arises because the ESXi host cannot find the specific port ID on the distributed virtual switch that the VM is trying to use. This can happen when the vDS configuration on the host (stored locally in /etc/vmware/dvsdata.db) differs from the vCenter Server's configuration, often due to stale or corrupted data, or after certain network or migration changes.
Follow one of the below 4 workarounds:
1. If you are able to power off the affected VM, unregister the VM (Right click VM → Remove from inventory) and re-register it on a different host. (See Add or Register a Virtual Machine (VM) in vCenter Server)
2. Reassign VM to a different distributed port group
Steps to Reassign VM Port Group via dVSwitch:
3. Disconnect the Nic on the vm:
4. Manually assign a VM network adapter a different distributed port ID: