Views:

Summary



Restore went successfully through all stages and failed at the very end with error: Failed to delete object

Symptoms



The following situation (see log excerpts below) can arise for "Production" mode - restore went successfully through all stages and failed at the very end indicating failure to delete object - original server - can be number of reasons for such failure, this specific example is due to original server is powered on.
 
Create VMs: Removing VM (XYZ) registration with old/failed resources. The VM will be re-registered with the same UUID but using the recovery resources
Failed to overwrite/re-register VM (XYZ). Error = (VMwareDeleteObjectException).
Failed to delete object (XYZ). vCenter server (vcenter) reports: (The attempted operation cannot be performed in the current state (Powered on).)
No selected item is recoverable.
 


Resolution



"Production" mode restore replicates original virtual machine to the smallest details, including UID, Disk ID and assumes there is no identical server in the VMware environment. If a virtual machine is found, ECX attempts to delete it. Failure to delete original virtual machine causes restore job to fail.

​​​​​​When "Production" mode restore is desired, shutdown of the original virtual machine will allow its deletion and "Production" mode restore should completed successfully. 

If deletion of the original virtual machine is not desired, other modes ("Test" or "Clone") should be used.