How to mount VirtualBox drive image (vdi) in Ubuntu 12.10/12.04
Sponsored Link
Install vdfuse in ubuntu 12.10/12.04
Open the terminal and run the following command
sudo apt-get install virtualbox-fuse
Using vdfuse
vdfuse syntax
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
NOTE: you must add the line "user_allow_other" (without quotes) to /etc/fuse.confand set proper permissions on /etc/fuse.conf for this to work.
Example
If you want to mount .vdi file use the following syntax
sudo vdfuse -f /path/to/file.vdi /path/to/mountpoint
/path/to/mountpoint will now contain files like ‘EntireDisk', ‘Partition1', etc. If there's only one partition showing, you probably want that one. So to mount the filesystem, just type:
mount /path/to/mountpoint/Partition1 /path/to/someother/mountpoint
The filesystem should now be mounted on /path/to/someother/mountpoint.
I’ve asked to install virtualbox-fuse but it seems to be only for the OSE and not the offical package released from Oracle, as it wants to remove virtualbox-4.1.
Nevermind this comment 😉 It just removes the Orcale package for the Ubuntu one… I forgot there is no more OSE since v4.x.
I don’t understand it :
I killed “#” from fuse
vdfuse -f /home/rlubu/VirtualBox VMs/XP/XP.vbox /mnt
I gave chmod
info:NOTE: you must add the line “user_allow_other” (without quotes)
to /etc/fuse.confand set proper permissions on /etc/fuse.conf
for this to work.
A example?
This wants to remove the package from virtualbox.org repository – how to avoid that?
Correct its :
sudo vdfuse -wf file.vdi /mountpoint
-w mean read/write for all user, without -w you cant see any partition.
To install it download it from launchpadppa and use dpkg -i –force-all yourvdfusefile.deb
virtualbox-fuse is now replaced by libguestfs:
See http://libguestfs.org/
I wouldn’t recommend libguestfs as a replacement for vdfuse. It’s an enormous hog of an app which draws in countless packages you’ll never use as dependencies.
There’s an elegant solution using qemu-nbd which may be all you need:
http://bethesignal.org/blog/2011/01/05/how-to-mount-virtualbox-vdi-image/
It only requires installation of qemu-utils (seems like it doesn’t even need nbd-client).
How i set this permissions in file fuse.conf?!