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 http://code.kliu.org/misc/vhdutils/ to see the full syntax and download the utility.