On Linux qemu-nbd can be used to access disk images in different formats as if they were block devices.
For example, to mount a VHD file run
1 2 | qemu-nbd --connect= /dev/nbd0 -- format =vpc <vhd_file> mount /dev/nbd0p1 /mnt/ |
To unmount and disconnect the nbd device run
1 2 | umount /mnt qemu-nbd --disconnect /dev/nbd0 |
You need to make sure the nbd module is loaded first: modprobe nbd