Re-adding ESXi host to vSphere Distributed Switch fails with port key conflict error
search cancel

Re-adding ESXi host to vSphere Distributed Switch fails with port key conflict error

book

Article ID: 451859

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

After restoring vCenter Server and a vSphere Distributed Switch (VDS) from a backup, attempting to re-add an existing ESXi host that was previously connected to the VDS may fail with the following error:

"Cannot rejoin the host to VDS <VDS Name>, the uplink port <Port ID> of the host conflict with an existing port of the same key"

Environment

VMware vCenter Server 7.0
VMware vCenter Server 8.0
VMware ESXi 7.0
VMware ESXi 8.0

Cause

After the restore of vCenter Server and VDS, the unadded ESXi host retains its previous port ID information. If the corresponding port ID is already being used by another ESXi host that has already been added to the VDS, a port ID conflict occurs and the addition of the ESXi host fails.

Resolution

Temporarily remove the already-added ESXi host with the conflicting port ID from the VDS, add the host that failed to add, and then re-add the removed host.

  1. Log in to the vSphere Client.

  2. Select the target VDS in the inventory.

  3. Select the Ports tab, check the port ID output in the error message, and identify the ESXi host with the conflicting port ID.

  4. Place the ESXi host identified in Step 3 into maintenance mode.

  5. Remove the ESXi host identified in step 3 from the target VDS.

    Note: If necessary, migrate the network (port groups) to a standard switch beforehand.

  6. Add the ESXi host that failed to add to the VDS.

  7. Re-add the ESXi host removed in step 5 to the VDS.

    Note: A new port ID will be assigned upon re-addition.

  8. Exit maintenance mode on the re-added ESXi host.

Additional Information

Remove Hosts from a vSphere Distributed Switch

Migrate Virtual Machines (VMs) and VMkernel Adapters from Distributed Switch (vDS) to Standard Switch (vSS) (306406)

vSphere Distributed Switch への ESXi ホストの再追加がポート キー競合エラーで失敗する (451861)