Unable to Remove a Port Group from a vSphere Distributed Switch Due to Port Mirroring Dependencies
search cancel

Unable to Remove a Port Group from a vSphere Distributed Switch Due to Port Mirroring Dependencies

book

Article ID: 419424

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When attempting to delete a distributed port group (dvPortGroup) from a vSphere Distributed Switch (vDS), the following error appears:

The resource '####' is in use. Operation failed!

Environment

VMware vCenter Server 
VMware vSphere ESXi

Cause

The Port Mirroring sessions are still associated with the vSphere Distributed Switch. These sessions maintain active dependencies, even if the affected port groups have been removed from the ESXi hosts.

Resolution

Remove all Port Mirroring sessions associated with the vDS, then attempt to remove the distributed port group again.

  1. Identify Port Mirroring Sessions
        a. In the vSphere Client, navigate to: Networking > vDS > Configure > Port Mirroring
        b. Review all mirroring sessions and locate any that reference the port group.

  2. Remove or Edit Mirroring Sessions
          • Select the session → Actions > Edit → remove source/destination ports
    OR
          • Delete the entire session if unused

 

Additional Information

Port Mirroring sessions create references within the vDS configuration. These references persist until the sessions are explicitly removed, preventing deletion of related port groups or the host from the switch.