/opt/vmware/vcloud-director/bin/cell-management-tool detect-rp-mismatches --fix-mismatch-with-vc
Row with VRP.id = xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx is not referenced by table ORG_PROV_VDC.
Delete stale row? y
Not able to delete VRP with id xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx.
Finished fixing resource pool mismatches with VC.
vCloud Director 10.x
Stale VM records in the computevm table
to help solving the issue execute the following steps:
1) perform a RECONNECT of the vCenter from Provider > Resources > Infrastructure resources > vCenter Server Instances and click on the vCenter and RECONNECT.
2) Wait for the reconnect to complete and re-run the fix-mismatch-with-vc command. If issue remains, continue next step
3) Remove the stale records in the computevm
table:
Example error:
/opt/vmware/vcloud-director/bin/cell-management-tool detect-rp-mismatches --fix-mismatch-with-vc
Row with VRP.id = xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx is not referenced by table ORG_PROV_VDC.
Delete stale row? y
Not able to delete VRP with id xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx.
Finished fixing resource pool mismatches with VC.
Use vrp.id from error to select possible stale vm records from the computevm table:
1. SSH to Primary DB cell
2. Connect to DB
# sudo -u postgres psql vcloud
3. Run the following select statement.
select * from computevm where vrp_id = 'xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx';
Confirm that the VMs are UNDEPLOYED status and do not contain vmmoref values.
Then open case to support to assist deleting the records from DB