You can use libguestfs-tools to achieve this.
-
First, you need to install it, on Ubuntu/Debian-like Linux that would be:
sudo apt-get install libguestfs-tools -
Then, you can mount almost whatever you wish:
guestmount --add yourVirtualDisk.vhdx --inspector --ro /mnt/anydirectoryThis is just an example of read-only extraction point.
Hints:
-
Run it as normal user, i.e.:
guestmount ...Instead of:
sudo guestmount ... -
Switches; citations from man page:
--addAdd a block device or virtual machine image.
--inspectorUsing virt-inspector(1) code, inspect the disks looking for an operating system and mount filesystems as they would be mounted on the real virtual machine.
--roAdd devices and mount everything read-only. Also disallow writes and make the disk appear read-only to FUSE.