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!
VMware vCenter Server
VMware vSphere ESXi
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.
Remove all Port Mirroring sessions associated with the vDS, then attempt to remove the distributed port group again.
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.