Symptoms:
ERROR: update or delete on table "vdc_logical_resource" violates foreign key constraint "fk_vap_vm_scl_me2vdc_logi_reso" on table "vapp_vm_sclass_metrics"
Detail: Key (id)=(###-###-##-###) is still referenced from table "vapp_vm_sclass_metrics".
VMware Cloud Director 10.x
The issue can occur if the Storage Class references for a vApp are still pointing to the destination OrgVDC instead of the source OrgVDC
To resolve the issue, update the Storage class reference to the vApp_vm and vapp_vm_sclass_metrics from the Cloud Director database.
Note: This procedure modifies the Cloud Director database. Ensure to take a backup of the database before proceeding.
To confirm how to update the references, please contact a technical support and note this Knowledge Article ID (320423) in the problem description. For more information, see Creating and managing Broadcom support cases.