Unable to remove expired vApps from Expired Item
search cancel

Unable to remove expired vApps from Expired Item

book

Article ID: 340418

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
Removing expired vApps from Expired Item fails with an error:

org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.vmware.vcloud.common.model.logicalresource.VdcLogicalResourceModel


Resolution

To resolve this issue:
  1. Run these SQL queries for SQL DB:

    • Manual:

      select * from vapp_vm where name = 'vsrx-c' and id=0x0A46EE58531F4BAC94520727A2370E87
      select * from vm_container where name like 'vsrx-c%' and sg_type=2
      select * from vm_container where name like 'vsrx-c%'
      select id from vapp_vm where vapp_id in (select sg_id from vm_container where name like 'vsrx-c%' and sg_type=2)
      delete from vapp_vm_sclass_metrics where vapp_vm_id in ((select id from vapp_vm where vapp_id in (select sg_id from vm_container where name like 'vsrx-c%' and sg_type=2)));

    • Automated:

      select * from vm where creation_status != 'RESOLVED';
      select * from vapp_vm where creation_status != 'RESOLVED';
      select * from vm_container where creation_status != 'RESOLVED';
      update vm set creation_status='RESOLVED' where creation_status != 'RESOLVED';
      update vapp_vm set creation_status='RESOLVED' where creation_status!='RESOLVED';
      update vm_container set creation_status='RESOLVED' where creation_status!='RESOLVED';

  2. Delete the vAPP from UI.

Note: You must change the lease period for the respective org to permanently delete and restart cell services.