Error:"Internal Server Error" when deleting empty vApps from a VMware Cloud Director organization
search cancel

Error:"Internal Server Error" when deleting empty vApps from a VMware Cloud Director organization

book

Article ID: 403228

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Deleting an empty vApp from an organization in VMware Cloud Director(VCD) UI fails with:
    [ ########-####-####-####-############e ] Internal Server Error
     - org.hibernate.exception.ConstraintViolationException: could not delete: [com.vmware.vcloud.common.model.VAppModel#89#######-####-####-####-############]
     - ERROR: update or delete on table "vm_snapshot" violates foreign key constraint "fk_vm_snap_disk2vm_snapshot" on table "vm_snapshot_disk"
      Detail: Key (id)=(12######-####-####-####-############) is still referenced from table "vm_snapshot_disk".
  • A clone of the vApp and its previously existing VMs were created before the vApp was empty.
  • The empty vApp(s) doesn't show any snapshots present in the VCD UI.

Environment

VMware Cloud Director 10.6.1.1

Cause

The issue is due to incorrect references to the snapshot of the newly cloned VMs and the empty vApps. 

Resolution

To resolve the issue, the snapshots on the newly cloned VMs can be deleted before deleting the empty vApp(s). 

For steps to remove the snapshot, please refer the documentation.