Friday, 28 November 2014

Errors when merging VHD and AVHD files in PVS

Due to a broken link in my avhd chain I was completely unable to merge a groups of AVHD's into a base VHD. I tried all the options that appeared in the Citrix forums and which I could find VIA search. These included:

Using powershell: Get-VHD on 2012r2
Using the Citrix DLL: Rundll32 VhdUtil.dll.VhdMerge

And a whole host of other methods.

Finally I stumbled upon Kai Liu who created the below which merged the disks, quickly and easily:

 - Find the latest .AVHD file by creating the date created
 - Extract the makevhd.exe file (Either 32 or 64bit) to the same directory as the VHD files.
 - Run the script in this format,  “makevhd -d xxnewxx.vhd 0 xxxxxx.avhd

The utility will run (Nothing is displayed until it finishes) and it will merge the files into merged.vhd in the same directory location. You can have a look at the Disk I/O section to see the high I/O to the various avhd and vhd files to monitor progress.

Pop to to see the full syntax and download the utility.


  1. Thanks for sharing. I think the problem can be solved by replacing the dll file itself. You can fing it here
    . Just add it to the system.

  2. Thanks for sharing this useful information. I can also suggest virtual data rooms that I had experience with.