When disabling the Supervisor from Workload Management > Supervisor, the status shows the Supervisor is deleted but hangs with the message: "NSX Resource cleanup is in progress."
/var/log/vmware/wcp/wcpsvc.log shows a failure to delete the NSX segment because it has a VM or VIF attached. You will see log entries similar to the following:ERROR: Cleanup failed! Please try again.ERROR: Failed to delete segment vm-domain-c#:12fd762a-f2d4-####-####-######-vif-default-network-0-vm-domain-c#:12fd762a-f2d4-####-####-#####-vif-default-network-0, error {"httpStatus""error_code""module_name" : "Policy""error_message" : "The object path=[/infra/segments/vm-domain-c#:12fd762a-f2d4-####-####-#####-vif-default-network-0] cannot be deleted as it has 1 VMs or VIFs attached. Disconnect all VMs and VIFs before deleting a segment.'
VMware Cloud Foundation (VCF) 9.0.
The Supervisor deactivation process fails to delete the NSX segment because an active port remains in use on that segment. This is typically caused by a virtual machine (VM) or network adapter still connected to the segment, which prevents the NSX resource clean-up process from completing.
Note: It is not expected to see VMs on a system-created segment. If any are present, please validate their purpose before disconnecting the VM from the segment.
Note down the segment name from the wcpsvc.log file.
Log in to the NSX Manager.
Navigate to Networking > Segments and filter for the segment identified in the logs.
Examine the segment configuration to identify any active ports connected to it.
Trace the active port to the specific virtual machine or network adapter connected to the segment.
Remove the network adapter from the affected VM or disconnect the VM from the segment to clear the port.
Monitor the vSphere Client; the Supervisor deletion task should now proceed and complete successfully.