Storm season is back, bringing with it the potential for significant weather events. If you have clients in areas prone to infrastructure disruption, visit the Disaster Recovery Resources guide for preparedness information. Datto recommends performing proactive disaster recovery testing to mitigate potential downtime. See our articles about the importance of disaster recovery testing and Preparing For A Cloud Virtualization Test: Policies, Procedures, And Partner Responsibilities to learn more. For live updates, follow @datto on Twitter.

Restoring Thick-Provisioned VHD Exports to Hyper-V (Windows Server 2008 & Up)

Follow

Topic

This article describes the process for restoring a thick-provisioned VHD export to Hyper-V (Windows Server 2008 and up).

Environment

  • Datto SIRIS
  • Datto ALTO
  • Microsoft Hyper-V
  • Windows Server 2008
  • Windows Server 2012
  • Windows Server 2016

Description

Prerequisites

Follow the steps in the Export Image article to obtain and copy the machine's recovery point to the hypervisor as a VHD or VHDx file. 

If any of the protected host's volumes are larger than 2TB, you must do a VHDx image export. VHD virtual disks do not support volumes larger than 2TB.

Although image files on Datto SIRIS are dynamic, sparse or thin-provisioned, when a VHD image file is copied from the Datto SIRIS using copy-paste (or other tools that do not accommodate dynamic/sparse/thin provisioning), the VHD image file will be copied with thick provisioning. See Restoring Thin-Provisioned VHD Exports to Microsoft Hyper-V (Windows Server 2008 & Up) if you'd like to move forward with a thin-provisioned restore.

When creating your virtual machine:

  • If both boot.vhd and C.vhd are present in the export, select boot.vhd as the first drive, and attach C.vhd as the secondary drive.
  • If only C.vhd is present, use C.vhd as the first drive.
  • For modern Windows installations, you must copy both the boot.vhd(x) and C.vhd(x) from the export to have a bootable restore.
  • For legacy Windows or Linux installations, you only need to copy the C.vhd(x) or sda1.vhd(x) from the export to have a bootable restore.
You will not receive the option to attach multiple disks to a Hyper-V VM in the initial creation wizard. You must complete the wizard and then manually edit the VM settings afterward to add any additional disks.

Procedure

 Hyper-V Manager Server 2008

If the VM was not previously hosted in the Hyper-V Manager, you must create a new VM. Otherwise, replace the existing Hyper-V machine's virtual disks with the VHD(x) files copied from the image export:

1. From the Hyper-V Manager click New → Virtual Machine. When the New Virtual Machine Wizard launches, click Next.

Hyper-V-Manager.pngFigure 1: Hyper-V Manager

2. At the Before You Begin page, click Next.

Figure 2: New VM Creation Wizard (click to enlarge)

3. Provide a name and location for the virtual machine, then click Next.

4. Provide the amount of RAM to allocate the virtual machine, then click Next.

5. In the drop-down menu, select which NIC to use in the virtual machine. The default is not connected.

4NewVirtualMachineWizard-ConfigureNetworking.pngFigure 3: Configure networking (click to enlarge)

6. On the Connect Virtual Hard Disk page, select Use an existing virtual hard disk. Provide the path to the datastore to which the VHD file was copied. Click Next.

5NewVirtualMachineWizard-ConnectVirtualHardDisk.pngFigure 4: Connect virtual hard disk (click to enlarge)

7. On the Summary page, confirm that all configuration settings are correct and click Finish.

8. Click Start.

fini.pngFigure 5: Start the virtual machine (click to enlarge)

Build VHD into Hyper-V Manager Server 2012 and Server 2016

If the VM was not previously hosted in the Hyper-V Manager, you must create a new VM. Otherwise, replace the existing Hyper-V machine's virtual disks with the VHD files copied from the image export:

1. From the Hyper-V Manager click New Virtual Machine. When the New Virtual Machine Wizard launches, click Next.

1BuildVHDIntoHyper-V.pngFigure 6: The Hyper V Manager (click to enlarge)

2. Provide a name & location for the virtual machine, then click Next.

3. Provide the amount of RAM to allocate the virtual machine, then click Next.

4. Specify the VM Generation.

Generation 1: Provides the same virtual hardware to the virtual machine as previous versions of Hyper-V.

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.

Once a virtual machine has been created, you cannot change its generation.

Figure 7: The Server 2012/2016 New Virtual Machine Wizard (click to enlarge)

5. In the drop-down menu, select which NIC to use in the virtual machine. The default is none.

4NewVirtualMachineWizard-NIC.pngFigure 8: Server 2012/2016, configure networking (click to enlarge)

6. On the Connect Virtual Hard Disk page, select Use an existing virtual hard disk. Provide the path to the datastore where the VHD file was copied in the previous section, then click Next.

vmw4.pngFigure 9:  Server 2012/2016, connect hard disk (click to enlarge)

7. On the Summary page, confirm all configuration settings are correct and click Finish.

8. Click Start to launch the virtual machine.

7-Fini.pngFigure 10: Server 2012/2016, Launch the virtual machine (click to enlarge) 

Troubleshooting

Index

Logon failure: the user has not been granted the requested logon type at this computer.

You may encounter this error message when importing a VM into Hyper-V, as shown below:

Figure 12: Failed to add virtual hard disk (click to enlarge)

This Windows error can occur if the VM's special identity is missing the Log on as a Service permission on the Hyper-V host (possibly as a result of a failed group policy refresh). To resolve this issue, follow the troubleshooting steps provided by Microsoft in Starting or Live Migrating Hyper-V virtual machines may fail with error 0x80070569 on Windows Server 2012-based computers.

Thin Provisioning Unavailable

Microsoft does not currently provide tools to transfer VHD files to Hyper-V with sparse/thin/dynamic provisioning. This requires converting the disks from a live VM using Microsoft Virtual Machine Converter, described here. The converter is available for download here.

Mouse and networking do not work in the VM after restore

This can happen when the virtual machine is unable to reach the Hyper-V Integration Services on the Hyper-V host. To resolve the issue:

  1. Make sure that the Hyper-V Integration Services are enabled on the host.
    Log into the affected VM and use the keyboard to access the Windows Device Manager
  2. Press the Windows key + R to invoke the Run dialog box, type devmgmt.msc and press Enter.
  3. In the Device Manager window, scroll down to System.
    Find the Microsoft Hyper-V Virtual Machine Bus device. There may be a yellow exclamation mark next to it.
  4. Press Enter to open the Device Information window, then press Tab until you see an outline on one of the tabs across the top of the window.
  5. Use the keyboard arrows to select the Driver tab.
  6. Press Tab until the Update Driver button is highlighted. Press Space to click the button.
  7. Press Tab until the option for Browse my computer for driver software is highlighted.
  8. Press Space to select it.
  9. Press Tab until the Let me pick from a list of device drivers on my computer option is highlighted. Press Space to select it.
  10. The Select the device driver you want to install for this hardware screen will appear. Make sure that the Show compatible hardware check box is selected. You should see Microsoft Hyper-V Virtual Machine Bus listed in the Model box.
  11. Press Tab until you have highlighted the Microsoft Hyper-V Virtual Machine Bus driver, and then press Enter.
  12. The software will install. The screen may flicker during mouse and networking driver installation.
  13. After the software installs, the mouse should be functional. Check Hyper-V Manager to confirm that the network adapter is connected. Enter the IP address of the VM if it is set to static.
  14. Check the Services control panel to make sure that the Hyper-V Integration Services are running.

Additional Resources


Was this article helpful?

2 out of 2 found this helpful

You must sign in before voting on this article.

Calling all Partners! We want to hear your feedback! Please participate in this quick survey and help us build a better, more-relevant Knowledge Base!

Want to talk about it? Head on over to our Community Forum!