Article ID: kb10106Last Modified: 16-Aug-2024
Cannot restore VM (code 2045)
Situation
A Hyper-V restore plan fails with the following error: Cannot restore VM. Restoring virtual machines to Hyper-V requires deletion of target Hyper-V VM. Failed to delete Hyper-V machine: test-restore-VM
Cause
This error occurs on Hyper-V cluster VMs restore attempts to the original location while VM on the target location is in running state.
Solution
To restore clustered VMs to the original location, running VM must be deleted manually. To do this, proceed as follows:
- Open Failover Cluster Manager.
- Find the required cluster, expand it, then select Roles.
- Select the VM listed in the error, right-click on it, then select Remove.
- As the running VM is deleted, run the restore plan again.