MintGuide.org / How to mount a VirtualBox VDI image file in Linux mint?

How to mount a VirtualBox VDI image file in Linux mint?


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:
for x32
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

for x64
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).

How to mount a VirtualBox VDI image file in Linux mint?How to mount a VirtualBox VDI image file in Linux mint?

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

How to mount a VirtualBox VDI image file in Linux mint?How to mount a VirtualBox VDI image file in Linux mint?

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

Good Luck!!!

 

20-11-2015, 09:00
Go Back