I have intermittently run in a situation in which the recomposeVapp API will fail when adding a VM with exception “Unable to perform this action. Contact your cloud administrator”. The root cause seems to be a problem accessing the NFS storage, but regardless of the cause, I need to be able to recover from this situation. The problem I have is that the partially-created VM does not belong to Any VAPP, it appears to be orphaned.
I can delete it from the GUI, but cannot find out how to retrieve it from the API, because iterating through all the children VMs in my VApps will not find it. And I cannot re-create a new one, because it will fail due to a duplicate name.
For now, I am addressing this by assigning a temporary name to the VM until the recompose is done; that way at least not have the permanent name stuck against an un-deletable VM. But I would like to have a better solution. Does anyone know if there is a way to VMs which are in the database but not actually created in VCenter (besides the GUI)?