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 (Org VDC) from VMware 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"

  • Virtual Machine (VM) was moved from one Org VDC to another.

Environment

VMware Cloud Director 10.x

Cause

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

Resolution

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

Workaround:

The workaround for this issue requires modification of the Cloud Director database.

For assistance, contact Broadcom Support and note this Article ID (371272) in the problem description. For more information, see Creating and managing Broadcom support cases.