Finally I got it working. So in summary here are the steps to perform
- Install macfuse
- Install Virtual Box
- Compile vdfuse as mentioned in the question
-
Mount the vhd disk
sudo ./vdfuse -tVHD -w -f/Path/To/VHD /Path/To/Mountpoint
-
Attach the virtual partition blockfiles
hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount /Path/To/Mountpoint/PartitionN
-
Mount the virtual partition
mount -t YourFS /dev/diskK /Path/To/ParitionMountPoint