VBoxMount is a little tool for providing virtual disk images from VirtualBox as linux block devices. It uses the linux kernel's network block device driver to do it in userspace (otherwise we'd have to bring vbox code into kernelspace which is a no-go).
I have been developing it for Topalis. From the very beginning of the project it was clear that it should become open, and maybe integrated into VirtualBox itself later. It is currently hosted on Launchpad, including all its awesomeness (bazaar branches, releases, bug-tracker).
Grab the first release here. File bugs here. Have fun!

The next item on the ToDo is snapshot support.

P.S.: It is a bit ugly to build right now, mostly because the VirtualBox' SDK doesn't include the necessary headers, nor a package-config file. I will file a "bug" about that at their bug tracker and hope that this will change.
If out-of-tree building doesn't work, you could try the old in-tree branch here. The in-tree version is not as up-to-date as the out-of-tree since I only use the latter one for developing.

Discussion

  1. I should summarise it:

    Please implement a BUSE (block in user-space) kernel module and then re-implement VboxMount on top of that

  2. Cool!
    I'm curious:
    1) Does it work (maybe read-only?) when the virtual disk is in use by a running virtual machine?
    2) VirtualBox also supports VMWare, RAW partitions etc. virtual disks. What about VBoxMount?

  3. @Marius: Thanks, corrected.

    @ robepisc: I use the API that VirtualBox itself uses to write and read to virtual disks so everything that VirtualBox supports, should be supported by VBoxMount.

    @foo: The first internal version was a FUSE based version. Not so great to say the least. I also investigated the use of device mapper, but that didn't work because of how dm is designed. (You actually explain it yourself why it doesn't work in your blogpost)
    We needed something now, if at one time BUSE comes up I'd be happy to use it. Also the overhead is not that big. We use a socketpair for the IO which is said to be very fast. The kernelspace <-> userspace context switch wont go away with BUSE as well.

Leave a Reply to robepisc Cancel reply

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

Made by ThemesKult