Error "Failed to remove all edge gateways, vApps, media or disks from this VDC" when trying to delete a Organization VDC
search cancel

Error "Failed to remove all edge gateways, vApps, media or disks from this VDC" when trying to delete a Organization VDC

book

Article ID: 392339

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Attempting to delete an Organization Virtual Datacenter (VDC) failed, upon reviewing the failed task details the following can be seen

    Details: 
    [ ########-####-####-####-############ ] Internal Server Error - Failed to remove all edge gateways, vApps, media or disks from this VDC.

    Debug Information:
    com.vmware.vcloud.api.presentation.service.InternalServerErrorException: Internal Server Error
                  at com.vmware.vcloud.api.presentation.service.impl.VdcServiceAdapterImpl.waitForFuture(VdcServiceAdapterImpl.java:2626)
                  at com.vmware.vcloud.api.presentation.service.impl.VdcServiceAdapterImpl.deleteVdcTask(VdcServiceAdapterImpl.java:2105)
                  at com.vmware.vcloud.api.presentation.service.impl.VdcServiceAdapterImpl.executeTask(VdcServiceAdapterImpl.java:3284)
                  ...
                  at java.base/java.lang.Thread.run(Thread.java:829)
    Caused by: com.vmware.vcloud.api.presentation.service.InvalidStateException: Failed to remove all edge gateways, vApps, media or disks from this VDC.
                  at com.vmware.vcloud.valc.activities.DeleteVdcActivity$DeleteVdcContentsCompletePhase.invoke(DeleteVdcActivity.java:605)
                  ... 7 more
  • Further tasks may show as failed, such as "Delete Virtual Application ..."

    Details:
    [ ########-####-####-####-############ ] Internal Server Error - java.lang.NullPointerException

    Debug Information:

    com.vmware.vcloud.api.presentation.service.InternalServerErrorException: Internal Server Error
                  ...
    Caused by: java.lang.RuntimeException: java.lang.NullPointerException
                  ...
                  at com.vmware.vcloud.vdc.impl.DeleteVappActivity$RemoveVAppFromDBPhase.invoke(DeleteVappActivity.java:492)
                  ... 7 more
    Caused by: java.lang.NullPointerException
                  at com.vmware.ssdc.backend.dao.impl.HibernateVAppDao.deleteVAppById(HibernateVAppDao.java:419)
                  at com.vmware.vcloud.vdc.impl.DeleteVappActivity$RemoveVAppFromDBPhase.lambda$invoke$2(DeleteVappActivity.java:494)
                  ...

Environment

VMware Cloud Director 10.5
VMware Cloud Director 10.6

Cause

There are vApps on the Org VDC that cannot be deleted from the UI.

Resolution

This will need the modification in the VMware Cloud Director DB, so please make sure to take the  backup of the VMware Cloud Director Database: Backup and Restore of VMware Cloud Director Appliance

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