Supervisor deactivation gets stuck in a loop with message "Removing templates ... state REMOVE phase PENDING"
vCenter logs show:
/var/log/vmware/wcp/stdstream.log.stdout
2026-08-14 08:11:36.000 ERROR clean_service.go:145 Failed to delete VPC on NSX error="nsx error code: 500030, message: The object path=[/orgs/default/projects/default/vpcs/###########/groups/default] cannot be deleted as either it has children or it is being referenced by other objects path=[/infra/domains/default/security-policies/##########/rules/<custom policy name>]" vpcID=########## vpcPath=/orgs/default/projects/default/vpcs/##########
VCF 9.x
NSX Policy Manager rejected the deletion of the default VPC groups (and the VPCs) because a custom NSX Security Policy (/infra/domains/default/security-policies/<custom policy name>) references the default groups of these WCP VPCs (/orgs/default/projects/default/vpcs/<VPC_NAME>/groups/default).
In NSX Policy Manager, open Security Policy /infra/domains/default/security-policies<custom policy name>
Delete policy <custom policy name> so that it no longer references the default groups of the WCP VPCs (kube-system_##########, vmware-system-supervisor-services-vpc_##########, and vks-##########).
Once the reference is removed in NSX Manager, WCP's background clean_service worker will automatically succeed on its next retry attempt and complete the Supervisor removal.