ESXi host using Distributed Switches (vDS) fails migration to a new cluster managed by a different vCenter server.
search cancel

ESXi host using Distributed Switches (vDS) fails migration to a new cluster managed by a different vCenter server.

book

Article ID: 324532

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

If you remove an ESXi host configured with a vDS from a vCenter Server system and add it to a new vCenter, you will see an error similar to the below: 

 

  • Error:
"The host proxy switch associated with ####-####-###-###-##-###-###.####.##.## no longer exists in vCenter Server. vCenter Server is not able to automatically remove the host proxy switch because it is still in use. To resolve the issue, disconnect any VMs and VMkernel adapters that might be connected to the switch and remove the switch."
  • The error will point to one or more of the distributed switches in the host's inventory: Host > Configure > Networking > Virtual Switches
  • The issue also occurs if the ESXi host disconnects from vCenter and is added back to the same vCenter, or if the vCenter needs to be rebuilt for any reason.

Environment

VMware vCenter Server

VMware vSphere ESXi

Cause

  • A Distributed Switch is created and managed by a single vCenter Server.  vCenter sends a copy called the "host proxy switch" to each ESXi host where it is configured.
  • The vCenter Server where the ESXi host is migrated to will see this host proxy switch and know that it is not a copy of a Distributed Switch that it manages. 
  • A host cannot automatically disconnect itself from a vSphere Distributed Switch (vDS) during a migration, so the error is triggered.

Resolution

  • Hosts connected to a vCenter vDS must be removed from the vDS first, before then being migrated. If not removed, the proxy switch that is maintained on the host will remain intact. This will prevent the host from connecting to a vDS managed by the new vCenter server.
 
This is expected behavior. Distributed switches are created and owned by vCenter, and a proxy copy is given to each host. In situations where the host is moved to a new vCenter or the vCenter is rebuilt and the host is re-added, the vCenter Server Distributed Switch does not recognize the host's proxy copy of the switch. This error will generate asking the user to verify that the host's proxy copy is the same as the vCenter Server's Distributed Switch.
 
There are 2 methods for resolving this alarm:
 
Method 1
Creating and migrating to a new vDS: 
  1. Connect to the vCenter Server directly using the vSphere Client.
  2. Verify the vCenter Server's current vDS or create a new vDS.
    • Note : Make sure the name of the newly created Distributed Virtual Switch (vDS) is different from the name of the proxy Distributed Switch.

      a. Create and configure the appropriate port groups on the newly create vDS.
       
  3. Navigate to Networking tab and select the appropriate vDS.
  4. Launch the Add and Manage Hosts wizard.
  5. Select the host and the physical adapters that are currently connected to the host's proxy switch. 
  6. Click Next.
  7. Select the virtual adapters that are to be migrated to the vDS.
  8. Choose the virtual NICs that are currently connected to the host's proxy switch and provide a target port group.
  9. Click Next.
  10. Select the virtual machines that you want to migrate to the newly created vDS. All the virtual machines that are currently connected to the host's proxy switch should appear with a warning icon in the list and you can locate them easily. You can select multiple virtual machines and assign a target portgroup at once.
  11. Complete the wizard. The migration now starts.

In some situations, the user does not need the vDS on the host at all any more. In this case, the user can delete the host's proxy copy by clicking on Inventory > Host > Configure > Networking > Virtual Switches. The vDS will be listed here. If objects are still attached to the vDS, they will need to be moved to another switch. Once the vDS is empty, there will be an option to remove the vDS in the menu next to the vDS. 



If a "resource is in use" error occurs, see The resource 'Port-ID' is in use error when removing a host from VDS.

 

Method 2 

Removal of stale vDS data from the host:

  1. Remote into the ESXi host
    Execute esxcfg-vswitch -l
     

  2. Remove vmnic from the vDS
        esxcfg-vswitch --del-dvp-uplink=vmnic2 --dvp=88 <DVS Name>
        Repeat for each vmnic that is attached to the stale vDS
  3. Delete Stale vDS
        net-dvs -d <DVS Name>
  4. Confirm removal
        esxcfg-vswitch -l
    Only  vDS should no longer be listed in the output of this command.

 

Additional Information

If you have NSX involved and vibs are present but the host is not prepared for NSX run through NSX VIBs are not removed from an ESXi host to remove NSX.