VHD Export: Hyper-V for Windows Server 2008 & Newer, and Citrix XenServer

Follow

Topic

This article discusses VHD Export into Hyper-V for Windows Server 2008, 2012 and Citrix XenServer.

Environment

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

Overview

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 A Thin-Provisioned VHD Export Into Hyper-V: Windows 7, Server 2008r2 And Newer 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.

Procedure

 Build VHD or VHDx into 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 with the VHD file copied in the Export Image topic.

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.

3. Provide a name & location for the virtual machine. Click Next.

4. Provide the amount of RAM to allocate the Virtual Machine. 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 2: New Virtual Machine Wizard- configure networking.

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

5NewVirtualMachineWizard-ConnectVirtualHardDisk.pngFigure 3: New Virtual Machine Wizard- connect virtual hard disk

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

8. Click Start.

fini.pngFigure 4: Start the virtual machine

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

If the VM was not previously hosted in the Hyper-V Manager, you will need to create a new VM. Otherwise, replace the existing Hyper-V machine with the VHD file copied according to the steps  in the Export Image article.

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

1BuildVHDIntoHyper-V.pngFigure 5: The Hyper V Manager

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. In the drop-down menu, select which NIC to use in the virtual machine. The default is none.

4NewVirtualMachineWizard-NIC.pngFigure 6: The New Virtual Machine Wizard- configure networking

7. 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 to from previous section, then click Next.

5NewVirtualMachineWizard-VHD.pngFigure 7: New Virtual Machine Wizard- connect hard disk

8. On the Summary Page confirm that all configuration settings are correct and click Finish.

9. Click Start to launch the virtual machine.

7-Fini.pngFigure 8: Launch the virtual machine

Import VHDs/VHDx into Citrix XenServer

Alternatively, XenConverter can be used to restore to a Xen host environment. Documentation from Citrix is available here.

1. In XenServer, click File > Import. This will load the Import Wizard. On the first page, browse to the location on the XenServer to which the VHD file(s) were copied and click Next.

1XenServerFileImport.pngFigure 9: The XenServer import wizard

2. Provide a VM name, number of CPUs, and RAM allocation. Once configured, click Next.

3ImportWizard-VMDefinition.pngFigure 10: Define the virtual machine

3. Confirm the location is correct, then click Next.

4. On the Select target storage page, click Next.

5ImportWizard-Storage.pngFigure 10: Select target storage

5. Choose the virtual network interface for the VM and click Next.

6. On the OS Fixup settings page, click Next.

7. Select which of the Citrix XenServer's NICs to provide the VM access to, and enter either DHCP or Static TCP/IP settings. Click Next when finished.

8ImportWizard-TransferVMSettings.pngFigure 11: Transfer VM settings

8. Confirm all settings for the imported virtual machine displayed are correct & click Finish.

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

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.

2. Log into the affected VM and use the keyboard to access the Windows Device Manager. 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.

4. Find the Microsoft Hyper-V Virtual Machine Bus device. There may be a yellow exclamation mark next to it.

5. 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.

6. Use the keyboard arrows to select the Driver tab.

7. Press Tab until the Update Driver button is highlighted. Press Space to click the button.

8. Press Tab until the option for Browse my computer for driver software is highlighted. 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!