Mount a VirtualBox VDI file on Ubuntu and Debian
Tested on Ubuntu 10.10.
If one of your virtualbox OS instances is hosed, you may still want to reach the files on it. You can actually mount the vdi file (the virtual disk image) on your Linux, and reach the files inside.
VirtualBox 4.0.x did not work for the following, I installed VirtualBox 4.1.6 .
Download gord-vbox-extras_1.0-4_i386 from here.
This will install vdfuse-v82a on your computer and in your path.
Make sure your user is in the fuse group, and that the line "user_allow_other" is commented in, in the /etc/fuse.conf preferences.
Figure out where the VDI file is that you want to mount. Let's say it is called "myvirtualmachine.vdi".
Make an empty directory to be the mount point of the volume that holds the file systems of your VDI image. Call it e.g. "mountpoint".
Mount the volume with:
vdfuse-v82a -f ~/VirtualBox\ VMs/myvirtualmachine/myvirtualmachine.vdi mountpoint/
Make a directory to hold the file system, call it e.g. "file-system".
Mount the file system there:
sudo mount mountpoint/EntireDisk file-system -o loop
This was enough for me, and all files are now visible and editable. I had put the OS directly on the entire disk in th evirtual machine. If there are partitions, maybe there is more mounting to do; I do not know.
You may need to use sudo to add and edit files, if their access restrictions don't match with your user id.
I have uploaded a new version of gord-vbox-extras to sourceforge. It now has zenity and nautilus and virtualbox-4.0 as formal dependencies. If you run KDE or something else, you can always unpack the package, rather than installing it.
Läs mer: virtualbox.org • View topic - Discuss: Mount any VBox-compatible disk image on the host