Search This Blog

Tuesday, September 14, 2010

Merge AVHD with VHD

AVHD is a file created when you perform snapshot. Once you delete the snapshot and shutdown the Virtual Machine, automatically AVHD will merge with VHD but....

Dunno how , something cause the the merging did not happen. Well, it just happen to me whereby i had VHD and AVHD file even snapshot is deleted and Virtual Machine has shutdown.
Then the question is how to merge AVHD to parent VHD to become one file.

Here is what you should do:
1. Go to Actions and click Edit Disk

2. Select AVHD file

3. Select Merge option

4. Select merge to the parent virtual hard disk.

5.Review the settings and click Finish

Gosh ! Never expect merge options available in Edit Disk options...


  1. Thanks! Comes in handy

    Why has Hyper-V not merged the files automatically when the snapshot was removed in the first place?

  2. Hi David,

    This issue will resolve on next release of Hyper-V on Windows 8. Next version of Hyper-V will automatically merge the avhd when delete the snapshot. And good thing is you do not need to shutdown the vm.

    For current version, well ....

  3. I tried to create a snapshot earlier today and it didn't take, so I clicked delete and shut the VM down and restarted it later. Tonight it paused itself due to low drive space. A snapshot was in the Hyper V manager, so I selected the snapshot tree and clicked delete, and the snapshot disappeared from the tree. I did not get a "merging" notification as I've seen on referenced on some sites.
    But the VM has been shut down for quite some time (I forced it off as there was not enough space left to resume it and shut it down), and there are now four avhd files varying in size from 473MB (second oldest) to 59GB (the oldest); two newer are 2 GB and 7 GB. The vhd file itself is 47.3GB and is 16 months old.
    Apparently it is not going to merge anything automatically. So which of these avhd files do I merge with the vhd file? Or do I have to do all of them one at a time? This is terrifying me.

  4. Hi Gregamatic... In your case I'd have merged from newest to oldest , but not sure ;-) Sure it' is terrifying ! Keep us informed about what you did!

  5. I also found this maybe helful oin your case :

  6. gregamatic,

    your problems is explained in another blog somewhere, basically you have to merge the latest to its parent one, so lets say you have 4 disks. the original vhd file and then avhd1, avhd2 and avhd3, the way you should merge these is merge avhd3 to its parent disk which is avhd2, and then merge avhd2 to avhd1 and then avhd1 to the original vhd file.