Error: 'ERROR: update or delete on table "vdc_compute_policy" violates foreign key constraint "fk_vapp_vm2vdc_comp_poli" on table "vapp_vm" ' when trying to remove an Organization VDC from VMware Cloud Director
search cancel

Error: 'ERROR: update or delete on table "vdc_compute_policy" violates foreign key constraint "fk_vapp_vm2vdc_comp_poli" on table "vapp_vm" ' when trying to remove an Organization VDC from VMware Cloud Director

book

Article ID: 367453

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Unable to delete old Organization VDC (Org VDC) or merge Provider VDC (PVDC).
  • Errors when deleting Org VDC 

    [ ########-####-####-########00db] Internal Server Error
    - could not execute update query; SQL [delete from vdc_compute_policy where is_auto_generated=? and (id in (? , ?))]; constraint [fk_vapp_vm2vdc_comp_poli]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute update query- could not execute update query - ERROR: update or delete on table "vdc_compute_policy" violates foreign key constraint "fk_vapp_vm2vdc_comp_poli" on table "vapp_vm"
      Detail: Key (id)=(########-####-####-########0f30) is still referenced from table "vapp_vm".

  • The issue occurs after performing V2T Cloud or merging Provider VDCs

Environment

VMware Cloud Director 10.6.x

Cause

V2T migration can cause incorrect data in Cloud Director Database where the storage metrics table or the compute tables do not contain the correct information.

Resolution

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

For assistance, contact Broadcom Support and note this Article ID (367453) . For more information, see Creating and managing Broadcom support cases