"The distributed Virtual Switch corresponding to the proxy switches on the host does not exist in vCenter or does not contain the host" error on ESXi host
search cancel

"The distributed Virtual Switch corresponding to the proxy switches on the host does not exist in vCenter or does not contain the host" error on ESXi host

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 experience these symptoms:

  • The host cannot automatically reconnect to the vSphere Distributed Switches (vDS). 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.
  • When you add the host back to vCenter Server, you see the alarm similar to:

    The distributed Virtual Switch corresponding to the proxy switches ## ## ## ## ## ## ## ##-## ## ## ## ## ## on the host does not exist in vCenter or does not contain the host.

 

Cause

The correct supported method of migrating to a new vCenter on DVS was not followed.

Moving an ESX/ESXi host with vDS from one vCenter Server to another

Hosts connected to a vCenter vDS must be removed from the vDS first before being removed. If not the proxy switch that is maintained on the host will remain intact. This will need to be removed before it can be joined to another vCenter vDS.

Resolution

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.