Jason Neurohr has a detailed, illustrated post on the subject of merging Hyper-V snapshots to a parent .vhd, leaving you with a single .vhd file you can run without having to worry about the snapshots. I found Jason’s post excellent and the steps described worked like a charm the first time I had to do this (while I didn’t persist, I found exporting a VM with snapshots from the Hyper-V R2 console just wasn’t working—the snapshots weren’t exported as expected).
The merge process is actually quite simple and I’m therefore reproducing just the relevant details from Jason’s post for my own future benefit:
- Backup the parent .vhd and all snapshot disks (.avhd)
- Change the extension for all snapshot differencing disks from .avhd to vhd
- Within the Hyper-V MMC, select the Edit Disk… option
- On the Locate Disk screen, locate the snapshot disk to be merged
- Select the Merge option and then the To the parent virtual hard disk option
- Finish the wizard and create a new virtual machine using the merged disk
If multiple snapshots exist, merge the most recent snapshot into the parent disk and work in reverse snapshot date order all the way back to the parent.