The operation could not be performed because the object is in an invalid state.vCenter Server task (moref: task-#######) failed in vCenter Server '#######'2025-11-10 14:03:40,272 | ERROR | Backend-activity-pool-1798 | DeleteVappActivity | [Activity Execution] Uncaught Exception during Activity execution. Recent phase: com.vmware.vcloud.vdc.impl.DeleteVappActivity$ProcessVAppStrandedItemsPhase@2939cbe0 - Handle: urn:uuid:########-####-####-####-############, Current Phase: DeleteVappActivity$ProcessVAppStrandedItemsPhase | requestId=########-####-####-####-############,request=DELETE https://####/api/admin/vdc/########-####-####-####-############,requestTime=1762783415844,remoteAddress=###.###.###.###:20398,userAgent=...,accept=application/*+json;version 40.0.0-alpha vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############) activity=(com.vmware.vcloud.valc.activities.DeleteVdcActivity,urn:uuid:########-####-####-####-############) vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############) activity=(com.vmware.vcloud.vdc.impl.DeleteVappActivity,urn:uuid:########-####-####-####-############)java.util.concurrent.ExecutionException: com.vmware.ssdc.library.exceptions.VimInvalidStateException: The operation could not be performed because the object is in an invalid state.vCenter Server task (moref: task-#######) failed in vCenter Server '#######' (########-####-####-####-############). at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:136) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)Caused by: com.vmware.ssdc.library.exceptions.VimInvalidStateException: The operation could not be performed because the object is in an invalid state.vCenter Server task (moref: task-#######) failed in vCenter Server '#######' (########-####-####-####-############). at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:362) at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:504) at com.vmware.vcloud.val.taskmanagement.TaskWaiterInvRecord.CheckForError(TaskWaiterInvRecord.java:176) at com.vmware.vcloud.val.internal.impl.FolderManagerImpl.renameEntity(FolderManagerImpl.java:223) at com.vmware.vcloud.val.internal.impl.FolderManagerImpl.renameItemsBeforeMoving(FolderManagerImpl.java:200) at com.vmware.vcloud.val.internal.impl.FolderManagerImpl.moveFolderItemsToAlternateFolder(FolderManagerImpl.java:154) at com.vmware.vcloud.vdc.impl.DeleteVappActivity$ProcessVAppStrandedItemsPhase.invoke(DeleteVappActivity.java:336) at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175) at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112) ... 5 moreCaused by: (vim.fault.InvalidState) { faultCause = null, faultMessage = (vmodl.LocalizableMessage) [ (vmodl.LocalizableMessage) { dynamicType = null, dynamicProperty = null, key = com.vmware.vim.vpxd.vm.connectionState, arg = (vmodl.KeyAnyValue) [ (vmodl.KeyAnyValue) { dynamicType = null, dynamicProperty = null, key = connectionState, value = orphaned } ], message = The VM is in orphaned state. } ]}...VMware Cloud Director 10.6.x
Even though the virtual machines are no longer directly associated with the vApp in VMware Cloud Director, it is attempting to remove all outstanding items it is finding in the underlying inventory based on the vApp folder, but cannot complete the process since vCenter us unable to perform the requested tasks on the orphaned VMs.
In order to remove the vApp experiencing this issue from VMware Cloud Director, perform the following:
For more information regarding orphaned VMs, please refer to the following article:
Virtual machines appear as invalid or orphaned or inaccessible