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

ERROR: update or delete on table "vdc_logical_resource" violates foreign key constraint when trying to delete 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 Cloud Director (VCD) provider portal.
  • Attempting to delete Org VDC from the VCD UI fails, and you see a message similar to:


Error: [ fcd8b9bb-xxxx-####-###x-c7b9e0996e84 ] Internal Server Error
 - could not delete: [com.vmware.vcloud.common.model.logicalresource.StorageClassVdcLogicalResourceModel#xxyyxxxx-####-cccc-dddd-8077f508e###]

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"

Environment

  • VMware Cloud Director for Service Provider 10.4.x
  • VMware Cloud Director for Service Provider 10.5.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 Broadcom VMware Cloud Foundation Support Team.