After click validate in cloud account, below error appeared:
Failed to enable regions: Cannot delete cloud zone as it is being used by project/s:xxxxxx
Below error found in provisioning log:
com.vmware.xenon.common.LocalizableValidationException: Cannot delete cloud zone as it is being used by project/s:xxxxxx
VMware Aria Automation 8.x
Manually remove the useless cloud zone from project and perform cloud account validation again
How to find the useless cloud zone through DB query:
1. SSH into the vRA node with root account.
2. Connect to the database:
vracli dev psql
3. Obtain the project ID:
\c project-db
select id from project where name = '<project name in error>';
4. Obtain compute resource information associated with all cloud zones corresponding to this project ID,replacing <project ID value> with the actual value:
\c provisioning-db
select name,assigned_compute_links from placement_zone_state where document_self_link in (select placement_zone_link from group_resource_placement_state where project_link = '/provisioning/resources/projects/' || '<project ID value>') ;
Format the content in `assigned_compute_links` and convert it to the following format:
/resource/compute/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
5. Check the status of the currently synchronized compute resource:
select name, document_self_link,type from compute_state where (power_state != 'ON' and type = 'VM_HOST') or (power_state != 'ON' and type = 'ZONE');
Compare the obtained `document_self_link` with the formatted content obtained in the previous step. If there is a match, it means there is a problem with this cluster/host in the cloud zone. Then, check the specific situation on the vCenter side by name.