How to mount a VirtualBox VDI image file in Linux mint?Other
VDI вЂ“ VirtualBox virtual disk format. Sometimes it is useful to mount this image just in your work environment. If you want to connect virtual disks to the operating system in the VirtualBox format to a local folder for more convenient operation, you can use vdfuse.
Before mounting the hard disk of the virtual machine you need to turn it off.
Vdfuse module uses a library to access the images and VirtualBox installs to a local folder using FUSE. In the local folder you will find EntireDisk, ... Partition1 PartitionN.
First we need to install vdfuse:
sudo apt-get install virtualbox-fuse
I found that this package does not exist in the official repositories. Well, then, get the package from the old repository, and won't pay attention to dependencies:
cd /tmp; wget http://archive.ubuntu.com/ubuntu/pool/universe/v/virtualbox/virtualbox-fuse_4.1.12-dfsg-2_i386.deb; sudo dpkg -i virtualbox-fuse_4.1.12-dfsg-2_i386.deb
cd /tmp; wget http://archive.ubuntu.com/ubuntu/pool/universe/v/virtualbox/virtualbox-fuse_4.1.12-dfsg-2_amd64.deb; sudo dpkg -i virtualbox-fuse_4.1.12-dfsg-2_amd64.deb
Now open the file /etc/fuse.conf:
sudo nano /etc/fuse.conf
In this file, find the line #user_allow_other, remove (#) and save the file (Ctrl+x=>Y).
Add yourself to the fuse group
sudo addgroup $USER fuse
*The changes will take effect after relogin
Let's create folder where we will mount the disk and partitions
mkdir ~/vdisk mkdir ~/part1
First, you need to mount VDI image file, then the standard method can be used to mount a partitions located in the container
vdfuse -f Machine.vdi ~/vdisk sudo mount ~/vdisk/Partition1 ~/part1
USAGE: vdfuse [options] -f image-file mountpoint -h help -r readonly -t specify type (VDI, VMDK, VHD, or raw; default: auto) -f VDimage file -a allow all users to read disk -w allow all users to read and write to disk -g run in foreground -v verbose -d debug