How to Back up and Restore a VM on Hyper-V Server 2008 R2

Below you will find information on how to backup & restore using advanced / manual techniques.

Check these simple walkthroughs first: Back up a Virtual Machine (Also as Video), Restore a Virtual Machine

 

Backup Virtual Machine Instructions

1. From the BackupChain Monitor Application, run the Backup Wizard and create a new backup task. If you want to create a task manually, follow the manual VM backup steps.

2. Select "Hyper-V Backup" and click next. Then select the folder in which the VM resides, for example C:\Virtual

3. Select a virtual machine backup target location and click through the rest of the wizards and accept default settings

4. Run the backup by clicking Run Backup Now.

 

Restoring Virtual Machines

1. Open BackupChain, click File->Restore Files and Folders and select your backup location

2. Select the folder containing the virtual machine and restore it locally to a new folder, for example: D:\restore

3. If restoring to another host, create a new virtual machine with the same specs as the one backed up (same RAM, number of CPUs, etc.)

4. Point the new VM to use the existing virtual disk in D:\restore

5. Start the virtual machine

6. If you receive a message saying the machine was shut down unexpectedly you can safely ignore it. This happens because the Hyper-V VSS writer doesn't mark a shutdown in the virtual image; however, you can be assured that VSS does take care of flushing all caches and performs all other operations necessary to get the image into an application-consistent state.

 

Hyper-V Virtual Machine Snapshot Restore

If you have snapshots and wish to restore them as well, you will need to do some extra manual work because Microsoft Hyper-V doesn't support moving snapshots to another machine; however, with these steps you can recreate the snapshot tree:

1. Create a new VM as described above and point to existing VHD. Then create the same number of snapshots as you have restored.

2. Delete the new snapshots manually and copy the restored snapshots into their place (rename restored snapshots to match the file names of the new snapshots) and rename the extension to .VHD instead of .AVHD

3. Repair those VHD snapshots (in Hyper-V Manager, click on Settings for the virtual machine and then the hard drive. Change the VHD to the new one and select Inspect Disk)

4. Now change the ACL and add the VM specific user account. Use the following PowerShell script:

#get the old vhd's permissions
$vm_perm = (get-acl .\old.vhd).access | where { $_.IdentityReference.tostring().contains("NT VIRTUAL MACHINE") }

#Load the new vhd's acl into memory
$newvhd = get-acl .\new.vhd

$newvhd.AddAccessRule($vm_perm)

$newvhd | set-acl .\new.vhd


5. Then open the virtual machine's XML config files and check all settings contained in that file.


Please email us your support requests about BackupChain to: support@backupchain.com