Error while migrating vCenter virtual machine in vCenter UI "The object or item referred to could not be found" combined with "vDS dvs port ##### cannot be found"
search cancel

Error while migrating vCenter virtual machine in vCenter UI "The object or item referred to could not be found" combined with "vDS dvs port ##### cannot be found"

book

Article ID: 398781

calendar_today

Updated On:

Products

VMware vCenter Server 8.0

Issue/Introduction

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 = ""
-> }

Environment

  • vCenter Server 7.x
  • vCenter Server 8.x

Cause

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.

Resolution

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:

  • 1. Navigate to the target dVSwitch → Right-click → "Add and Manage Hosts" → Manage Host Networking.
  • 2. Select the problematic host (checkbox) → Skip to "Migrate VM Networking".
  • 3. Check "Migrate virtual machine networking" → Choose "Configure per virtual machine".
  • 4. View current VM to port group mappings → Click "Assign Port Group".
  • 5. Select the same port group if available; otherwise, choose an alternate (note: temporary loss of VM connectivity may occur).
  • 6. Click Next → Finish to complete the reassignment.

3. Disconnect the Nic on the vm:

  • Right click on the vm and click "Edit Settings"
  • Deselect the "Connected" check box for the network adapter.
  • Save the configuration. (note: temporary loss of VM connectivity may occur)
  • Right click on the vm and click "Edit Settings"
  • Select the "Connected" check box for the network adapter.
  • Save the configuration.

4. Manually assign a VM network adapter a different distributed port ID: 

  • In vSphere, navigate to the target dVSwitch and expand it to see all of the distributed port groups. 
  • Find the port group used by the affected VM, and navigate to the 'Ports' tab. 
  • Take note of a port ID that is empty in the Ports list associated with this distributed port group. 
  • Right click on the affected VM → Edit Settings → Expand Network Adapter → Change the 'Port ID' and Save.