0

I attempted to do a backup of our virtualization server when moving from Hyper-V 2008 to R2. I changed the registry settings to register Hyper-V VSS with Windows Server Backup, and sent the backup on it's way while I went on to other things. Apparently the VSS portion didn't back-up the VM's like I had hoped, and after updating Windows Server and Hyper-V to R2, I was unable to restore the VM's correctly.

The backup completed and I have all of the files from before the update backed up, but is there any way to restore the VM's from the backup? The vhd's all seem to have old modified dates, and when bringing the machines up from these vhd's they have very old settings. I have found a bunch of avhd files (named according to GUID), but I'm not sure if I can create a VM with the old vhd and merge the snapshots with it.

1 Answers1

0

You need to know what AVHDs belong to each VHD, and the order (which can usually be figured out from the modified dates).

Merge the AVHDs into the original VHD in order (oldest to newest) using diskpart

CREATE VDISK FILE="C:\Snapshot.AVHD" parent="C:\VirtualMachin.VHD"
MERGE VDISK DEPTH=1

Make a backup copy (verify it) for all files before doing this, this process will erase the AVHD files as it goes, and permanently modify the original VHD file.

Hyper-V VMs should be turned off and fully merged before backup up at the VHD level. If you're using backup software that isn't fully Hyper-V aware, then this problem will occur.

Chris S
  • 77,337
  • 11
  • 120
  • 212
  • When I do this I get an error "Diskpart has encountered an error: The file exists." – DeliriumTremens May 19 '10 at 18:23
  • If I made any changes to the original VHD, the merge will end up with errors, correct? Should I recover the original VHD again and merge fresh? – DeliriumTremens May 19 '10 at 19:21
  • To your second comment, yes; the VHD file has to be exactly as it was when the snapshot was taken. I'm glad you got it; I think MS really screwed us all with no automated way to do this. – Chris S May 20 '10 at 00:51