ERROR: "update or delete on table "vdc_logical_resource" violates foreign key constraint" when deleting an Organization VDC
search cancel

ERROR: "update or delete on table "vdc_logical_resource" violates foreign key constraint" when deleting an Organization VDC

book

Article ID: 371272

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • You are unable to remove an Organization VDC (OVDC) from Cloud Director (VCD) provider portal.
  • Attempting to delete Org VDC from the VCD UI fails, and you see a message similar to:


Error: [ ########-####-####-####-############ ] Internal Server Error
 - could not delete: [com.vmware.vcloud.common.model.logicalresource.StorageClassVdcLogicalResourceModel#########-####-####-####-##########]

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"

  • VM was moved from one OVDC to another.

Environment

VMware Cloud Director10.x

Cause

The issue occurs after moving a virtual machine (VM) across Org VDCs, the VM still follows the storage policy of the old Organization VDC instead of following the storage policies of the new Organization VDC where it was moved. 

Resolution

This is a known issue which can affect the mentioned versions of VMware Cloud Director.

Workaround:
To work around this issue, open a new case with the Broadcom VMware Cloud Foundation Support Team. For more information, see How to Submit a Support Request