When attempting to add an ESXi host to a vSphere Distributed Switch (vDS) or migrating a host between vCenter Servers, the operation fails with the following error:
The specified key, name, or identifier 'DSwitch-Name' already exists
This issue occurs because the ESXi host contains a stale proxy vDS configuration from a previous vCenter registration or an ungraceful removal from a distributed switch. The host still "sees" a DVS object with the same name or identifier, preventing the new vCenter from creating the proxy DVS.
To resolve this conflict and successfully complete the host import, follow these steps:
Rename the Target DVS: Log into the new destination vCenter Server and rename the newly created DVS to clear the identifier naming conflict. (e.g., Change the prefix or name from DSwitch-XYZ-ABC to DSwitch-XYZ-ABC01).
Add the ESXi Host: Attempt to add the ESXi host to the newly renamed DVS (DSwitch-XYZ-ABC01). The host should now register and configure successfully without throwing the identifier error.
Verify Network Connectivity: Verify that all active Virtual Machines (VMs) on the host remain up, reachable, and continuously pinging without packet loss during the migration.