You can restore disks (VHD files) and configuration files (AVHD files) from a virtual machine.
Restore virtual machine files in the following situations:
-
The virtual machine is running, but one of its disk has errors.
-
The storage device that hosts the disks has errors or not available.
-
To attach a disk from one virtual machine to a different virtual machine, change the location when restoring the disk.
For details on checkpoint Information during restores, see Use of Checkpoint Information for Restores Using Microsoft Hyper-V Server 2012 R2.
Note
File level browse and restore of 4K sectored disks is not supported.
Procedure
-
From the CommCell Browser, expand Client Computers > virtualization_client > Virtual Server > Hyper-V > backup_set.
-
Start the restore from a subclient or backup set:
-
From the subclient, right-click the subclient and then select Browse and Restore.
-
From the backup set, right-click the backup set, point to All Tasks, and click Browse and Restore.
-
-
In the Browse and Restore Options dialog box, select Virtual Machine Files, and then click View Content.
-
From the browse results, expand the left pane, select one or more disk files to restore, and then click Recover All Selected.
The Restore Options for All Selected Items dialog box appears.
You can select multiple disk files to restore. If you have created a checkpoint for the virtual machine, select any associated .avhdx files as well as the base disks.
-
In the Destination client list, select the Hyper-V server used to back up the virtual machine.
To restore out of place, select a client that has the Virtual Server Agent installed.
-
In the Specify destination path box, enter the location for the disk restore or click Browse to select the location.
To restore to a Windows proxy client, enter a UNC path, and then provide the credentials for the destination client using the Impersonate User option.
-
To convert a virtual machine disk, under Virtual Disk Conversion, select Convert Disk to, and select one of the following values.
-
VMDK: VMware virtual disk format. The VMDK disk is created with thick lazy zeroed provisioning. After the conversion, you can attach the converted disk to an existing VMware virtual machine, or create a VMware virtual machine from the disk by using vSphere.
-
VHD: Legacy virtual hard disk format for Hyper-V.
Note
If you select a disk to restore that is not in VHDX format, the conversion option is not presented.
-
-
To restore with a different user account for the destination Hyper-V server:
-
Select Impersonate User.
-
In the User Name and Password boxes, enter the credentials for the user account that has access permissions to the Hyper-V server.
-
In the Confirm Password box, re-confirm the password for the user account.
-
-
To further customize the restore operation, click Advanced.
-
Click OK to run the restore job.
Result
When you create a checkpoint for a virtual machine, an associated .avhdx file is created for the virtual machine disk. If you restore virtual disk files from such a backup, you must restore both the base (parent) disk and any associated .avhdx files (child disks). After restoring disk files, you can run the following PowerShell command to relink the parent and child files:
PS C:\> Set-VHD -Path child_disk.avhdx -parentpath parent_disk.vhdx -IgnoreIdMismatch
After running this command you can mount the disk and browse guest files on the virtual machine disk.
When you restore a virtual machine disk file, the permissions associated with the original virtual machine are not restored. As a result, you might not be able to start a VM that refers to the disk file. You can address this issue by removing and re-adding the disk to the VM, by using Hyper-V Manager to reset the correct security permissions, or by using the icacls command to restore permissions as described in Hyper-V virtual machine may not start, and you receive a “‘General access denied error’ (0x80070005)” error message.