From Simon Crosby’s Citrix blog posting We’ve Open Sourced Our Optimized VHD Support:
Today Dutch Meyer of UBC, and Jake Wires of the Citrix XenServer storage team in Vancouver submitted our implementation of the Microsoft VHD virtual hard disk format to the Xen community for inclusion in the open source code base. So, if you want to write applications that read/write and process VMs in VHDs, you now have everything you need. The software is licensed under the BSD license.
More at Simon’s Blog Posting…
The patches for this source code is detailed at http://markmail.org/thread/dqcil5uyigwlk2sr.