Mount vhdx Image in Ubuntu

Install libguestfs library to allow accessing and modifying guest disk images

sudo apt-get install libguestfs-tools

Create mount point

sudo mkdir /mnt/vhd

Find target device filesystem using Guestfish – note this example is for ntfs system partition on device /dev/sd2

sudo guestfish --ro -a /path_to_vhd/vhd.vhdx

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
      ‘man’ to read the manual
      ‘quit’ to quit the shell

> run
> list-filesystems
/dev/sda2: ntfs
> exit

Use guestmount with -m device option on /dev/sd2 to mount vhdx image in read-only mode

sudo guestmount --add /path_to_vhd/vhd.vhdx --ro /mnt/vhd -m /dev/sda2

Use Krusader (Admin) to view /mnt/vhd (image contents) – note how this by-passes normal Windows NTFS permission restrictions

Cleanup

sudo guestunmount /mnt/vhd
sudo rmdir /mnt/vhd

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out comment
Enter name