Discuss: Mount any VBox-compatible disk image on the host

Discussions related to using VirtualBox on Linux hosts.

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby klaus » 30. Aug 2013, 15:17

There has been work on vdfuse quite recently to make it build with the latest VirtualBox versions: https://github.com/Thorsten-Sick/vdfuse - first of all a big thank you for his effort.

Since the VirtualBox developers always wanted to have such functionality (though I have to say that all existing solutions are not sufficiently safe for our taste because they don't lock the images and also are hairy to use with snapshots) I'm willing to use this as a starting point for our work, and the first step would be 'adopting' it. This means it'd be part of the VirtualBox tree, and most likely still have to be built separately, and initially we probably won't be able to do much more than keeping the code compatible with the rest of the code. What we ultimately want is a platform-independent (Linux, Windows, Mac OS X, Solaris, ...), end-user compatible version which means that it has to rule out the risk of data loss/corruption due to using images inconsistently or by a VM and vdfuse simultaneously.

One of the stoppers for doing this is the license of the code, currently GPLv2+. We're not able to take contributions with this license (see https://www.virtualbox.org/wiki/Contributor_information). Since there are 4 people who have changed this code I guess the easiest solution to get this into the tree is if all of them (h2o, Terry Ellison, Gordon Miller, Thorsten Sick). Thorsten already told me that he's fine with MIT licensing his changes, this leaves 3 contributors who'd need to agree. Note that once the code is in our tree it will be GPLv2 licensed, we use MIT only as an 'incoming' license to keep the people in the legal department happy.

Can I get a "I'm fine with submitting my vdfuse contribution to VirtualBox under the MIT license" from all contributors? If there are any questions/uncertainties let me know personally, I don't want to clutter this useful discussion topic with administrativa. Hope I made it clear enough that we don't have any plans to take this code away from anyone.
klaus
Oracle Corporation
 
Posts: 753
Joined: 10. May 2007, 14:57

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby coronafire » 2. Oct 2013, 08:06

Hi klaus,
I've just compiled from the github you mentioned ( Thorsten-Sick/vdfuse )
I did have a couple of issues however;

The readme references vdfuse-v82a.c but it appears to have been renamed if vdfuse.c ? Readme update is in order :-)

I also couldn't compile against the current svn checkout of the virtualbox include directory (as suggested in README.gord)
Code: Select all   Expand viewCollapse view
svn co svn/of/vbox/trunk/include

(get the real addr from virtualbox or the readme, I can't post web addresses yet)

Code: Select all   Expand viewCollapse view
sh vdbuild_new /usr/src/vbox/include vdfuse.c
In file included from vdfuse.c:71:
/usr/src/vbox/include/VBox/vd.h:182: error: expected specifier-qualifier-list before ‘PARTITIONING_TYPE’
strip: 'vdfuse': No such file
Compile Failed!


Updating to an older revision of the virtualbox include folder worked, I went back to 2012-08-01 (2012-10-01 was still bad, didn't bother narrowing it down any further)
Code: Select all   Expand viewCollapse view
cd path/to/include/
svn update -r '{20120801}'


Then I was able to compile just fine.

Cheers,
Andrew
coronafire
 
Posts: 1
Joined: 2. Oct 2013, 07:52

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby apos » 6. Oct 2013, 16:13

Hi, first of all thanks for this program.

I have to problems on Ubuntu 12.04:

1. I compiled the new version since I never managed to get to mount the actual snapshot of my machine. It's working fine so far, but I do not succeed in getting my actual snapshot. When I try to mount a snapshot like

vdfuse -r -f {xxxxx...xxxx}.vmdk /mnt/myvm


I only get the "EntireDisk" which I do not now how to mount.

2. When I try to use vdautomount script I get the following error (despite using .py-ending or not):

user@ac-hypervisor:/data/virtual_machines/myvm$ vdautomount myvm.vbox /mnt/myvm
File "/home/user/bin/vbox/vdautomount", line 38
parser = OptionParser (prog="vdautomount",


Am I missing a package?

Thanks in advance.
Axel
apos
 
Posts: 2
Joined: 6. Oct 2010, 22:32
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby gordboy » 9. Nov 2013, 18:41

Hi Guys

I'm happy for anyone to do anything they like with vdfuse. All I did was tidy up the code with patches and add a little readme.gord in there. It was really h2o that did the work AFAIK.

FWIW I'm using the 4.1.18 virtualbox-fuse 32 bit binary from the Debian Squeeze package -

http://packages.debian.org/wheezy/virtualbox-fuse

along with my zenity vdfuse-control script and a couple of other bits and pieces, all repackaged into -

http://sourceforge.net/projects/xspect3 ... b/download

Not sure about snapshots and stuff, and TBH I don't use it all that often any more.
gordboy
 
Posts: 3
Joined: 14. Mar 2011, 15:02
Location: Scotland
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 7, Windows XP

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby Killnolife » 22. Apr 2014, 08:32

Can anyone provide vboxhdd.h or vboxhdd-new.h file?

I do not have it and it results in a fail.
Killnolife
 
Posts: 4
Joined: 28. Feb 2014, 21:33

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby bogstad » 14. Nov 2014, 17:18

In a previous post on this thread from klaus, that you were looking at adding some version of vdfuse to VirtualBox proper. Is that what I see in the source as VBoxFUSE? If so, is there any documentation on how to use it? I've gotten it compiled and can mount an empty directory tree, but can't figure out how to point it at a VM disk image.
bogstad
 
Posts: 3
Joined: 9. Apr 2010, 04:17
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 7, Windows XP, KnoppMyth, Fedora

Re: Discuss: Mount any VBox-compatible disk image on the hos

Postby Aloysius » 21. Nov 2015, 10:13

Does this also support VirtualBox 5.x ?

I'm having trouble building it, but has the vdi format also changed perchance?
Aloysius
 
Posts: 1
Joined: 21. Nov 2015, 10:08

Re: Discuss: Mount any VBox-compatible disk image on the host

Postby itscomplicated » 26. Nov 2016, 10:10

Hello everybody

Any idea if vdfuse can be compiled with Virtualbox 4.3 on Kubuntu 14.04 64bit ?

At the moment I get:

P6P7H55E:~/work/vdfuse$ gcc vdfuse.c -o vdifuse `pkg-config --cflags --libs fuse` -l:/usr/lib/virtualbox/VBoxDD.so -Wl,-rpath,/usr/bin/virtualbox -pthread -I/usr/src/virtualbox-4.3.36/include
vdfuse.c:107:30: fatal error: VBox/VBoxHDD-new.h: No such file or directory
#include <VBox/VBoxHDD-new.h>

Thanks for any possible help
itscomplicated
 
Posts: 1
Joined: 26. Nov 2016, 10:04

Re: Discuss: Mount any VBox-compatible disk image on the host

Postby Vioner » 3. Oct 2017, 22:08

Hey guys.
I mount my VBox .vdi disk image with vdfuse and then modify it within Manjaro (Linux).
It works ok in general, but whenever I write something to it, there is a ~20 seconds delay before the actual, true write to the .vdi file.
I've confirmed this by running vdfuse in verbose mode confirming the output with iotop stats. Also made primitive tests by simply running the VBox and checking if difference is saved.

Maybe vdfuse operate with somekind of update interval/frequency?
Or maybe it has something to do with VBox itself?

Does any of you know how to reduce the write delay or preferably make it instantanious?
Vioner
 
Posts: 1
Joined: 3. Oct 2017, 22:01

Previous

Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 12 guests