2

Is it possible to mount VHDX (not vhd) disk file in Linux as a read + write block device ?

I have found that qemu-img allows conversion of vhdx disks to other formats, but I am looking for read + write mounting of such disks.

There is also qemu-nbd which allows for read-only mounting of vhdx disks.

But is there a ways to mount vhdx disk as a read + write ?

TimB
  • 183
  • 2
  • 10

1 Answers1

3

qemu-nbd offers according to its man page man qemu-nbd a read only option. There is no indication for limitation on mount options.

qemu-nbd maps the vhdx file to a block device, e.g /dev/nbd0, which can then be mounted as rw to a directory.

This Gist from allenyllee contains mount/unmount scripts with the required commands: https://gist.github.com/allenyllee/0a4c02952bf695470860b27369bbb60d

hargut
  • 3,848
  • 6
  • 10
  • it needs to be verified then, off I go. Thank you for the link. – TimB Apr 28 '19 at 06:27
  • it works ! I was staring at the answer for days now not seeing it, just assuming that qemu-nbd only provide read-only functionality. Thank you. – TimB Apr 28 '19 at 22:55