Mounting a VHD disk image file

      No Comments on Mounting a VHD disk image file

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

qemu-nbd --connect=/dev/nbd0 --format=vpc <vhd_file>
mount /dev/nbd0p1 /mnt/

To unmount and disconnect the nbd device run

umount /mnt
qemu-nbd --disconnect /dev/nbd0

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.