Granular (individual VM) restore of Hyper-V virtual machine from backup

Recently I was asked how to do a granular restore of a Hyper-V VM from a backup done by Windows Server Backup (the block-level image backup).

The Windows Server Backup Recovery Wizard allows you to restore Hyper-V, but it’s an all-or-nothing affair. Restore all your VMs or none at all.

So how do you recover one specific VM – especially to different machine (host)? Unfortunately it’s totally undocumented by Microsoft, and it’s not just a matter of restoring your VM’s directory and asking Hyper-V to open it up – because Hyper-V can only “import” a VM that had been specifically “exported”; it can’t import a VM from a backup.

Restoring on the same machine

Scenario: the virtual machine’s setup and configuration are fine, but you need to restore the virtual hard drives.

  1. Stop the Virtual Machine from the Hyper-V Manager
  2. Optionally copy your old VHD file(s) to somewhere else, just in case…
  3. Restore the VHD file(s) for that machine to the same location.
    • Launch the Windows Server Backup admin console
    • Click on “Recover” in the right hand pane
    • Choose the following options: “This Server” -> the appropriate point in time -> Files and folders [note: not Applications] -> locate your VHD file(s) -> recover to Original Location
  4. Start your Virtual Machine from the Hyper-V Manager
  5. If the VM was running at the time of your backup, the boot manager will point out that the machine was not shut down cleanly. That’s fine – just boot normally.

Restoring to a different host machine (or same host machine with corrupt config)

Scenario: virtual machine needs to be restored to a different host. However, it’s not possible to import a virtual machine onto the new host from a backup. Instead, follow this procedure.

  1. Restore the VHD file(s) for your virtual machine to a new location.
    • Launch the Windows Server Backup admin console
    • Click on “Recover” in the right hand pane
    • Choose the following options: “Another Server” -> the appropriate point in time -> Files and folders [note: not Applications] -> locate your VHD file(s) -> recover to Another Location, and choose a directory to restore to
  2. Create a new Virtual Machine from within Hyper-V Manager.
    • Set the RAM to match the RAM of the old machine
    • Set the network card to match the network card of the old machine
    • For your virtual hard disk, select “Use an existing virtual hard disk” and point it to your first restored VHD.
    • Complete the wizard.
    • If you had more than one HDD, stop the machine, add in the extra HDDs (File -> Settings
  3. If the VM was running at the time of your backup, the boot manager will point out that the machine was not shut down cleanly. That’s fine – just boot normally.
  4. In our tests, we did not have to reactivate the virtual machine when running on a host with dissimilar hardware. However, that’s no guarantee that you won’t need to reactivate it on your environments.

7 thoughts on “Granular (individual VM) restore of Hyper-V virtual machine from backup”

  1. You are saving my live here.
    Busy restoring 3 of 4 and works perfectly. The last one for some reason you cant see in the hyper-v display so a bit concerning but think if i following the restore for a diffrent machine it should be fine.

    Reply
  2. Great, now a quick run down on the “How To” of 2008 core wbadmin restoration of .vhd. Beofre purchase, given senario, 2x server 2008 cores implementations, Primary01 and Secondary02.
    Secondary02 is the new Host as Primary01 has been stolen – have a ‘BackupAssist’ backup, now need to restore the virtual guest server. steps?

    Reply
  3. Hi Ian,

    Thanks for your input. I’ll will pass your query onto our document writers so that they can develop an article on restoring guests within a Server Core environment.

    Stuart
    BackupAssist Team

    Reply
  4. Is it possible to take a VM backup and restore to a Non-VM machine with BackupAssist? I know I can do a granular restore to retrive files, but can I get a whole VM server restored to a non VM machine, In paticuular a domain controler that has been setup as a VM.

    Reply
    • Hi Tom,

      This is a bit of a migration task that can be performed with the tools in BackupAssist. My recommendation would be to image your machine from within the Guest. Because it’s a Guest machine, you’ll need to back it up to a NAS or iSCSI target.

      You’ll also need to build a RecoverAssist recovery environment (you can do this from any machine where BackupAssist is installed).

      Then on your physical machine, boot the RecoverAssist recovery environment and do a bare metal restore of your backup.

      Because you are going from virtual to physical hardware, you will most likely need the hardware independent recovery features in RecoverAssist, so that’s why I recommend it over the Windows Recovery Environment.

      I hope this helps and feel free to call our technical support number if you need more assistance.

      Regards,

      Linus

      Reply

Leave a Comment

Share on email
Share on print
Share on facebook
Share on google
Share on twitter
Share on linkedin

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email. Join 1,874 other subscribers