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

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

Other

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

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:
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!!!

 

Print version

Add comments

  • Local comments
  • Facebook comments
hoek
hoek 20 November 2015 20:58
Hey, Thanks!
  • 0
  • bowtiesmilelaughingblushsmileyrelaxedsmirk
    heart_eyeskissing_heartkissing_closed_eyesflushedrelievedsatisfiedgrin
    winkstuck_out_tongue_winking_eyestuck_out_tongue_closed_eyesgrinningkissingstuck_out_tonguesleeping
    worriedfrowninganguishedopen_mouthgrimacingconfusedhushed
    expressionlessunamusedsweat_smilesweatdisappointed_relievedwearypensive
    disappointedconfoundedfearfulcold_sweatperseverecrysob
    joyastonishedscreamtired_faceangryragetriumph
    sleepyyummasksunglassesdizzy_faceimpsmiling_imp
    neutral_faceno_mouthinnocent
Your attitude to the website Other polls