Mount VirtualBox VDI disk

19

11

I have a virtual Windows 7 computer using VirtualBox on a Linux host. How can I mount this virtual pc's harddisk (VDI file) in Linux? It's a dynamic file, meaning that it only takes up as much space as is actually used.

Bart van Heukelom

Posted 2009-09-03T11:46:38.950

Reputation: 1 958

I also want to know more about this. So far, the only way I coul dsee would be to actually start the VM, setup a shared directory, and put files there. – jfmessier – 2009-09-03T12:45:45.977

1

This is a duplicate of the question: http://serverfault.com/questions/210684/how-do-you-mount-a-vdi-image-on-linux.

– Isaac Sutherland – 2011-11-26T23:33:30.503

@IsaacSutherland This question is more than a year older than that one. – Bart van Heukelom – 2011-11-27T15:06:27.880

@BartvanHeukelom The top-ranked answer at the serverfault.com question works for me. Should I have copied thkala's answer to this thread? – Isaac Sutherland – 2011-11-28T02:44:08.437

Answers

5

it looks like vdfuse is the tool you are looking for. At least for Ubuntu (and possibly Debian) hosts. If you want to compile yourself (2010 source) you can do that too. Sources seem to be here.

To install in Ubuntu use sudo apt-get install virtualbox-fuse

There is also a script vdimount script on Google Code.

stwissel

Posted 2009-09-03T11:46:38.950

Reputation: 267

This doesn't work anymore as of 2013 as the package was removed. And the script you mention only mounts fixed sized images. – Frederick Nord – 2013-10-22T17:21:51.817

It still seems to be on launchpad: https://launchpad.net/ubuntu/raring/amd64/virtualbox-fuse

– stwissel – 2013-10-22T18:14:43.510

3

VDI is a complex format and AFAIK there's currently no software that can directly mount a dynamic VDI image, although there are plenty to converting it from/to other formats.

I hope to be wrong (or be wrong in the future, such as when someone writes that piece of software) and I'll take a look at this thread just in case ;-)

lapo

Posted 2009-09-03T11:46:38.950

Reputation: 381

1vdfuse works as of Ubuntu 12.04 (didn't test on any other version) for dynamic images too. Haven't tested one with snapshots yet – stwissel – 2012-06-21T04:43:26.660

2

I always wanted to know, if I could do that. Here is a very informative link >> http://forums.virtualbox.org/viewtopic.php?t=4748.

So it seems you can mount only fixed sized VDI files in both windows and linux.

vulcan_hacker

Posted 2009-09-03T11:46:38.950

Reputation: 200

not anymore. I successfully mount variable size VDI using vdfuse – stwissel – 2012-06-21T04:42:02.357

1

I came across this page while looking for a way to mount dynamic VDI files. I'm still looking. There is a commercial product available for Windows called WinMount that claims to do it. This doesn't help me (or you), but may help others who also stumble upon this web page.

user29720

Posted 2009-09-03T11:46:38.950

Reputation: