Error: "vCenter Server is not able to automatically remove the host proxy switch because it is still in use" on ESXi
search cancel

Error: "vCenter Server is not able to automatically remove the host proxy switch because it is still in use" on ESXi

book

Article ID: 431992

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms include the ESXi host becoming unmanageable or throwing network desynchronization errors. The following errors are observed in vCenter Server and on the ESXi host:

  • "The vSphere Distributed Switch corresponding to the proxy switches <UUID> on the host does not exist in vCenter Server or does not contain this host."

  • "The host proxy switch associated with <UUID> 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."

Environment

VMware vSphere ESXi
VMware vCenter Server

Cause

The ESXi host's local networking configuration has lost synchronization with the vCenter Server database. An orphaned Distributed Virtual Switch (DVS) proxy switch remains active on the host. vCenter Server is prevented from automatically removing this stale proxy switch because the host's management network and physical uplink are still actively bound to it.

Resolution

To resolve this issue, the management network and uplinks must be manually migrated to a standard vSwitch via the ESXi command line. This releases the lock on the stale DVS, allowing it to be removed.

Prerequisites: Ensure out-of-band management access (e.g., ILO, iDRAC, IMM) to the ESXi host console, as network connectivity will drop during these steps.

  1. Access the ESXi host via the Direct Console User Interface (DCUI) ESXi Shell.

  2. Identify the stale DVS, active VMkernel ports, and physical uplinks: esxcfg-vswitch -l

  3. Remove the existing management VMkernel interface: esxcli network ip interface remove --interface-name=<VMK_ID>

  4. Unlink the physical adapter from the stale DVS: esxcfg-vswitch -Q <VMNIC_ID> -V <dvport_ID> <DVS_NAME>

  5. Add the physical uplink to a standard vSwitch: esxcli network vswitch standard uplink add --uplink-name=<VMNIC_ID> --vswitch-name=<STANDARD_VSWITCH_NAME>

  6. Recreate the management VMkernel interface and assign it to the standard vSwitch port group: esxcli network ip interface add --interface-name=<VMK_ID> --portgroup-name="<PORTGROUP_NAME>"

  7. Reconfigure the IP settings for the management interface: esxcli network ip interface ipv4 set --interface-name=<VMK_ID> --ipv4=<IP_ADDRESS> --netmask=<NETMASK> -g=<GATEWAY_IP> --type=static

  8. Verify that the stale DVS has been automatically removed from the host once the dependencies are cleared: esxcfg-vswitch -l

  9. From the vSphere Client, migrate the VMkernel adapter and the physical uplink back to the production Distributed Switch.

Note: These steps are specifically for hosts with a single active uplink. For hosts utilizing multiple management uplinks, simply remove one spare vmnic from the Distributed Switch and attach it to the temporary standard vSwitch before migrating the VMkernel interface.

Additional Information

Reference: ESXi host using Distributed Switches (vDS) fails migration to a new vCenter Server (1017558).