How to mount VirtualBox drive image (vdi) in Ubuntu 12.10/12.04

Sponsored Link
If you want to mount VirtualBox drive image (vdi) in Ubuntu 12.04/12.10 use vdfuse.This Fuse module uses the VirtualBox access library to open a VirtualBox supported VD image file and mount it as a Fuse file system. The mount point contains a flat directory containing the files EntireDisk, Partition1 .. PartitionN. These can then be loop mounted to access the underlying file systems

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.

Sponsored Link

You may also like...

8 Responses

  1. MUD says:

    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.

  2. MUD says:

    Nevermind this comment 😉 It just removes the Orcale package for the Ubuntu one… I forgot there is no more OSE since v4.x.

  3. saltcushy says:

    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?

  4. Ubuntu Lack says:

    This wants to remove the package from virtualbox.org repository – how to avoid that?

  5. Zack Zen says:

    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

  6. Brian says:

    virtualbox-fuse is now replaced by libguestfs:

    See http://libguestfs.org/

  7. Roel de Cock says:

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

  8. StarterX4 says:

    How i set this permissions in file fuse.conf?!

Leave a Reply

Your email address will not be published. Required fields are marked *