This article describes the process for attaching a VHD export to a Windows host as a mounted volume, and exporting its data to a thin-provisioned Microsoft Hyper-V virtual drive.
To restore a VHD to Microsoft Hyper-V with thick provisioning, see Restoring Thick-Provisioned VHD Exports to Hyper-V (Windows Server 2008 & Up).
- Datto SIRIS
- Datto ALTO
- Microsoft Hyper-V
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
During this process, you will mount a restore, attach the restored VHD as a drive on your Hyper-V-enabled Windows machine, create a new, dynamically-allocated virtual hard drive in Hyper-V, and then copy the contents of the exported VHD to the new drive.
The VHD copy functions require Hyper-V manager. Follow the steps in the article Export Image to mount the recovery point as a VHD on your Datto appliance before you proceed.
NOTE: This article uses screenshots from Windows Server 2008. Your user experience may vary slightly by platform.
- Part 1: Attaching the Volume as a Logical Drive
- Part 2: Importing the Volume into Hyper-V Manager
- Part 3: Finalizing the Restore
Part 1: Attaching the Volume as a Logical Drive
1. Before proceeding further, mount an image export on your Datto device by following the steps in the Exporting to a Network Share section of the Export Image article. Make note of the CIFS/Samba VHD Share path your appliance provides once the restore is mounted.
2. Launch Disk Management on your Hyper-V-enabled Windows machine.
Figure 1: Launching Disk Management
3. Click Action → Attach VHD.
4. At the Attach Virtual Hard Disk prompt, select Browse.
Figure 3: Attach Virtual Hard Disk
5. In the Location field, enter the CIFS/Samba VHD Share you obtained in Step 1. Then, click Open.
6. When the share opens, select the hard disk image, and click Open.
NOTE: For Linux systems, C.vhd will be sda1.vhd.
There are two reasons to add a boot and a C volume:
For devices where UEFI is unsupported, adding a boot and C:\ volume is necessary to make GPT-formatted OS volumes readable.
It fixes virtualization failures for some MBR / BIOS agents. While a production Windows machine can still boot from its System Reserved partition if its NTFS bootstrap code is corrupted, virtualizations do not have this ability unless both the boot and C volumes are present.
7. At the Attach Virtual Hard Disk prompt, check the Read-only box, and click OK to mount the image.
Figure 5: Attach Virtual Hard Disk
8. The VHD will mount as a volume in Windows.
Part 2: Importing the Volume into Hyper-V Manager
1. Launch Hyper-V manager from Start → Administrative Tools → Hyper-V Manager.
2. From Hyper-V Manager, click Action → New Hard Disk.
3. If you see a Before You Begin dialog, click Next.
4. Select the destination Disk Format, and then click Next.
5. Choose the destination Disk Type, and then click Next.
6. Specify a name for the virtual disk and the location to save it to, and then click Next.
7. Select the disk or disks to copy by clicking Copy the contents of the specified physical disk and selecting the PHYSICALDRIVE value that is the same disk number as the VHD that is mounted. Then, click Next. Repeat this step for all disks involved in the restore.
8. Review the summary to ensure that the virtual hard disk is configured correctly. When you are ready to proceed with disk creation, click Finish.
9. A progress bar showing the status of the transfer will appear.
Figure 14: Creating the new virtual hard disk
10. After the transfer has completed, detach the VHD from Disk Management, as shown in Figure 14.
Figure 14: Detach VHD
Part 3: Finalizing the Restore
1. From Hyper-V Manager, click Action → New → Virtual Machine. When the New Virtual Machine Wizard launches, click Next.
2. If the Before You Begin page pops up, click Next.
3. Provide a name and (optionally) a storage location for the virtual machine, and then click Next.
Figure 15: Specify Name and Location
4. Specify the Generation of the VM. If you are using Hyper-V Manager 2008 or earlier, skip this step. Your Hyper-V Manager environment does not support Generation 2 virtual machines.
- Generation 1 provides the same virtual hardware to the virtual machine as previous versions of Hyper-V. Any virtual machine over 2 TB must use a Generation 2 template.
- Generation 1 VMs:
- Can use VHD and VHDx disk formats
- Only support the MBR boot type
- Generation 1 VMs:
- Generation 2 provides support for features such as Secure Boot, SCSI boot, and PXE boot using a standard network adapter. Guest operating systems must be running at least Windows Server 2012 or 64-bit versions of Windows 8.
- Generation 2 VMs:
- Can only use the VHDx disk format
- Only support UEFI; BIOS is unsupported
- Generation 2 VMs:
5. Provide the amount of RAM to allocate the virtual machine. Then, click Next.
6. Select the NIC to use in the virtual machine. The default value is Not Connected (Hyper-V Manager 2008 or earlier) or None (Hyper-V Manager 2012).
7. On the Connect Virtual Hard Disk page, select Use an existing virtual hard disk. Provide the path to the datastore where the VHD(x) was copied to in the previous section, and then click Next.
NOTE: Be sure to attach boot.vhd(x) first.
8. On the Summary page, confirm all configuration settings are correct and click Finish.
Figure 16: Summary
9. In the Virtual Machines pane, right-click the VM, and then click Settings .
10. Click the storage controller your boot.vhd(x) disk is attached to. Then, click Hard Drive → Add.
Figure 17: Hard Drive → Add
11. Select Virtual hard disk if it is not already selected. Browse to the location of your C.vhd(x) (or sda1.vhd, on Linux systems), select it, and click Apply. Repeat this step for each additional disk you need attached.
Figure 18: Browsing to and selecting a virtual hard disk
12. When you finish configuring the virtual machine's settings, click OK, right-click the VM, and click Start.
- If the VM boots, the restore is complete.
- If the VM fails to boot:
- Collect and research any errors thrown, if applicable
- Ensure the right Generation and disk type was selected for your boot type. Remember: MBR = Generation 1, GPT = Generation 2.
- Contact Datto Technical Support if you continue to experience bootability issues.
Figure 19: Starting the VM