Mount .vdi VirtualBox disk image

Assume a VirtualBox guest OS Windows VDI disk image mydisk.vdi that you wish to mount without Virtualbox, perhaps because your guest OS crashed. The disk space used by the cloned .img file will be the full expanded size of the dynamic partition if one was used. Example: dynamic partition max size was 100 GB but only 10 GB was used → clone operation uses full 100 GB.

Rescue files from VDI by copying the VDI to IMG format:

VBoxManage clonehd --format RAW mydisk.vdi mydisk.img

cd ~/"Virtualbox VMs/Windows"

Examine partition

parted mydisk.img  #not sudo


look for the “start” column for the biggest partition, that’s probably the virtual machine.

If you chose “12345 B”:

mount -t ntfs -o loop,ro,offset=12345 mydisk.img /mnt

It takes several minutes to unpack.

Explore the files in /mnt as usual. Copy out what you need.