I need to restore a vhdx file from backup on a Windows 2019 Hyper-V Core server using the command line. This is the command I am using:
wbadmin start recovery -version:10/12/2021-05:00 -itemType:hyperV -items:F3D...1E -recoveryTarget:C:\temp
The command generates the following warnings. After which I am prompted to continue with the restore or cancel it.
Warning: If a Virtual Machine you are trying to recover to alternate location was backed up from this host, this will delete and overwrite the original virtual machine if it still exists.
You have chosen to recover the application HyperV. The files for the following components will be recovered to C:\temp. Note: Recovering the files to an alternate location without involving writer will not recover the application.
Warning: The virtual machines might not start if their network settings are different after recovery. After recovery is complete use Hyper-V Manager to verify the network settings of the virtual machines before they are started.
I do not want the restore operation to delete and overwrite the original VM as it states in the warning. Further the warning seems to be contradictory. The scenario I would like to have play out is written in the Note as I am assuming that "...without involving the writer the application will not recover the application" possibly means that wbadmin will despite its warning, not overwrite the VM on the host. I cannot find any information on this online.
Furthermore there is an [-alternateLocation] option to the wbadmin start recovery command that is poorly documented. It does not even seem to be included in the official Microsoft documentation online.
-alternateLocation Valid only when recovering HyperV to alternate recovery target.
Allows recovering the HyperV components, updating configuration and
registering the VM with the Hyper-V management service.
Using it slightly changes the warnings I get, namely the Note is ommitted.
Warning: If a Virtual Machine you are trying to recover to alternate location was backed up from this host, this will delete and overwrite the original virtual machine if it still exists.
You have chosen to recover the application HyperV. The files for the following components will be recovered to C:\temp.
Warning: If a Virtual Machine you are trying to recover to alternate location was backed up from this host, this will delete and overwrite the original virtual machine if it still exists.
Warning: The virtual machines might not start if their network settings are different after recovery. After recovery is complete use Hyper-V Manager to verify the network settings of the virtual machines before they are started.
What I want to achive is basicaly a "Copy To File" as is found in the GUI version (Windows Server Backup) and I suspect the way to achieve this is by omitting the [-alternateLocation] option. I would like to see if anyone can confirm this before I pull the trigger and shoot myself in the foot. BTW I'm talking about an in production domain controller VM. So I cannot take any chances.