In VMware Cloud Foundation (VCF) 9.0, attempting to modify or reduce the number of VM classes assigned to a Provider's Region Quota encounter a validation error "Cannot remove VM classes from region quota. There are namespaces associated with them".
This prevents the removal of specific VM classes even if they are not currently hosting active virtual machines.
VCF Automation (VCFA) 9.0
VCF Automation 9.0 enforces strict referential integrity between infrastructure resources and active workloads. A VM class cannot be removed from a Region Quota if it is currently "bound" to an active Supervisor Namespace or defined within a Namespace Class template assigned to that organization.
Endpoint: GET https://<VCFA_FQDN>/tm/cloudapi/v1/namespaces
Locate the namespace in the JSON response and copy the "id" value (e.g., urn:vcloud:shareable_namespace:xxxx-xxxx).Endpoint: GET https://<VCFA_FQDN>/tm/cloudapi/v1/namespaces/{namespace_id}
Copy the entire JSON response body.Edit the JSON body you just copied.
Locate the virtualMachineClasses array.
Delete the objects corresponding to the VM classes you wish to remove.
Example Payload Snippet:
JSON
"virtualMachineClasses": [
{
"id": "urn:vcloud:virtualMachineClass:vcf-small"
}
// Removed: { "id": "urn:vcloud:virtualMachineClass:vcf-large" }
]Send the modified payload back to the control plane.
Endpoint: PUT https://<VCFA_FQDN>/tm/cloudapi/v1/namespaces/{namespace_id}
Body: The edited JSON from Step 3.Navigate to Infrastructure > Organizations > [Select Org] > Region Quota.
Edit the quota and deselect the VM classes. The error should no longer appear.