Discuss: Mount any VBox-compatible disk image on the host
-
- Posts: 1
- Joined: 1. Jan 2011, 17:57
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: Linux, Windows
Re: Discuss: Mount any VBox-compatible disk image on the host
I signed up on the forums just to say thank you gordboy!
I upgraded to vbox 4 and vdfuse from Debian sid was no longer working, so I extracted vdfuse from your .deb and everything is fine again.
A happy new year to all.
edit: oops I was able to mount the disks that I created previously with vbox 3, but for a new disk that I created with vbox 4 and that contains an ext4 partition I'm getting:
"ERROR: Invalid EBR signature found on image"
edit #2: that disk contained a fresh, default Ubuntu Natty installation. I deleted the extended partition that contained a swap logical volume and created a primary swap partition instead, and now I'm able to mount it. I guess some more fixes in EBR parsing are needed, but at least I'm OK for now.
I upgraded to vbox 4 and vdfuse from Debian sid was no longer working, so I extracted vdfuse from your .deb and everything is fine again.
A happy new year to all.
edit: oops I was able to mount the disks that I created previously with vbox 3, but for a new disk that I created with vbox 4 and that contains an ext4 partition I'm getting:
"ERROR: Invalid EBR signature found on image"
edit #2: that disk contained a fresh, default Ubuntu Natty installation. I deleted the extended partition that contained a swap logical volume and created a primary swap partition instead, and now I'm able to mount it. I guess some more fixes in EBR parsing are needed, but at least I'm OK for now.
Re: Discuss: Mount any VBox-compatible disk image on the host
Thanks guys.
A few things about my package. If you just want the executable, you can do dpkg-deb -x package.deb DIRNAME/ , to unpack it into DIRNAME/ without installing.
If you do decide to install, there are a couple of gotchas. First, the vdfuse-control script needs zenity to run. And also your user has to have passwordless sudo privileges for the mount & umount commands.
I may fix the first issue in a future release by changing the DEBIAN/control file to make zenity and bash formal dependencies. The second issue cannot be so easily dealt with. Simply making the vdfuse-control script suid root (a bad idea anyways) just won't work.
To make your user "joe" have passwordless sudo mount/umount, you want the following in /etc/sudoers (always use visudo to edit this)
joe ALL = NOPASSWD: /bin/mount, /bin/umount
This was a public service announcement from gordboy enterprises
PS. Here is the download link again:
http://sourceforge.net/projects/xspect3 ... b/download
A few things about my package. If you just want the executable, you can do dpkg-deb -x package.deb DIRNAME/ , to unpack it into DIRNAME/ without installing.
If you do decide to install, there are a couple of gotchas. First, the vdfuse-control script needs zenity to run. And also your user has to have passwordless sudo privileges for the mount & umount commands.
I may fix the first issue in a future release by changing the DEBIAN/control file to make zenity and bash formal dependencies. The second issue cannot be so easily dealt with. Simply making the vdfuse-control script suid root (a bad idea anyways) just won't work.
To make your user "joe" have passwordless sudo mount/umount, you want the following in /etc/sudoers (always use visudo to edit this)
joe ALL = NOPASSWD: /bin/mount, /bin/umount
This was a public service announcement from gordboy enterprises
PS. Here is the download link again:
http://sourceforge.net/projects/xspect3 ... b/download
-
- Posts: 26
- Joined: 11. Oct 2009, 02:09
- Primary OS: Linux other
- VBox Version: PUEL
- Guest OSses: winXP
Re: Discuss: Mount any VBox-compatible disk image on the host
I had a vdfuse update recently and now I can't mount my VDI.gordboy wrote:have passwordless sudo privileges for the mount & umount commands.
I just repeat last commands from my .bash_history as root but it's keeping say
Code: Select all
[root@laptop ~]#ls -l /media/BigStor/VboxFiles/Electon.vdi
-rw------- 1 myself users 3757089280 27 feb 16.58 /media/BigStor/VboxFiles/Electon.vdi
[root@laptop ~]# vdfuse -f /media/BigStor/VboxFiles/Electon.vdi /tmp/vdmnt/
ERROR: opening vbox image failed
DESCRIPTION: This Fuse module uses the VirtualBox access library to open 8<8<
I don't know what block me to mount as a root the vd images in that directory
New Package Available
@VbRider - My comments about passwordless sudo privileges are only relevant to my (Ubuntu) package, as one of the files in there (/usr/bin/vdfuse-control) has sudo commands in it. And I don't know where you got your vdfuse from either. Maybe if you read the posts properly, you might understand better.
Anyways.
I have uploaded a new version of gord-vbox-extras to sourceforge. It now has zenity and nautilus and virtualbox-4.0 as formal dependencies. If you run KDE or something else, you can always unpack the package, rather than installing it.
The main new usage feature is a greatly improved vdfuse-control script, which now allows mounting any partition from within the vdi. There are other minor improvements in the error handling and informative messages.
There are a couple of critical gotchas that I didn't mention in my previous posts:
http://forums.virtualbox.org/viewtopic. ... 50#p168692
http://forums.virtualbox.org/viewtopic. ... 65#p168972
And they are:
1. You have to be in the "fuse" group to use vdfuse-v82a.
2. You have to edit (or create) /etc/fuse.conf to contain the line "user_allow_other", and that file has to be world readable.
Here is the link for the new package -
http://sourceforge.net/projects/xspect3 ... b/download
This was another public service announcement from gordboy enterprises
Anyways.
I have uploaded a new version of gord-vbox-extras to sourceforge. It now has zenity and nautilus and virtualbox-4.0 as formal dependencies. If you run KDE or something else, you can always unpack the package, rather than installing it.
The main new usage feature is a greatly improved vdfuse-control script, which now allows mounting any partition from within the vdi. There are other minor improvements in the error handling and informative messages.
There are a couple of critical gotchas that I didn't mention in my previous posts:
http://forums.virtualbox.org/viewtopic. ... 50#p168692
http://forums.virtualbox.org/viewtopic. ... 65#p168972
And they are:
1. You have to be in the "fuse" group to use vdfuse-v82a.
2. You have to edit (or create) /etc/fuse.conf to contain the line "user_allow_other", and that file has to be world readable.
Here is the link for the new package -
http://sourceforge.net/projects/xspect3 ... b/download
This was another public service announcement from gordboy enterprises
-
- Posts: 26
- Joined: 11. Oct 2009, 02:09
- Primary OS: Linux other
- VBox Version: PUEL
- Guest OSses: winXP
Re: New Package Available
Forgive I took as launch point for my discussiongordboy wrote:@VbRider - My comments about passwordless
Also I missed some details:gordboy wrote:And they are:
1. You have to be in the "fuse" group to use vdfuse-v82a.
My linux is Archlinux, Kernel 2.6.37, Virtualbox 4.0.4
Vdfuse version 80-2. Probably here starts the problem. No fuse group
Almost sure the package isn't maintained and I will inform the forum to make the corrections.
You may find the package information in this page
I'd like ask you, if is there a tarball and let compile for our own architecture, or we should take the files out from the deb package?
vdfuse-v82a tarball available
This is the tarball of the (hacked and modified) vdfuse-v82. I have called this vdfuse-v82a. It is the same vdfuse-v82a as is ready-built for x86 in my gord-vbox-extras package. If you don't like what I have done with the source and vdbuild script, tough luck
############################
RADIATION ALERT - Use At Your Own Risk
############################
The download link:
http://sourceforge.net/projects/xspect3 ... z/download
This was another public service announcement from gordboy enterprises
############################
RADIATION ALERT - Use At Your Own Risk
############################
The download link:
http://sourceforge.net/projects/xspect3 ... z/download
This was another public service announcement from gordboy enterprises
-
- Posts: 2
- Joined: 6. Apr 2011, 16:04
- Primary OS: Ubuntu other
- VBox Version: PUEL
- Guest OSses: windows xp, linux
Re: Discuss: Mount any VBox-compatible disk image on the host
any hope to compile it against the current release (v4.0.4) ?
if not, which revision of the headers should i fetch from svn?
if not, which revision of the headers should i fetch from svn?
-
- Posts: 7
- Joined: 30. Mar 2011, 20:36
- Primary OS: Ubuntu 8.04
- VBox Version: OSE other
- Guest OSses: windows linux
Re: Discuss: Mount any VBox-compatible disk image on the host
I have the 4.0.4 OSE tarball which I use for my 'headers', and located the 'libs' in /usr/lib/virtualbox. I'm on Ubuntu 10.04.2 64-bit. i have NOT (needed) to actually build my OSE, just got it to poke around.
vdfuse-v82a built for me great and works as advertised (with the edits to /etc/fuse.conf) I made myself a Makefile, adapted from the shell script bundled, and built from there.
I too would like vdfuse to be 'snapshot' aware. Data reads/writes through snapshots requires chaining together the snapshots and its parents, and so on recursively. vdfuse as is written will only (I think) work on a 'parent' file. Maybe there is another, higher level, API provided by VBOx to 'traverse' the vdi files. After all, VBoxmanage clonehd mySnapshot.vdi does the 'right thing' in that as it clones, it 'flattens/merges' the vdi file chain. I could strace (or look at sources!) the clonehd operation, but it might be hairy.
Anyone actually had the VM running for which the vdi file 'fused' is its 'harddisk' while fusing it also in the host? Is it a disaster?
Kudos to the developers of vdfuse, great effort.
vdfuse-v82a built for me great and works as advertised (with the edits to /etc/fuse.conf) I made myself a Makefile, adapted from the shell script bundled, and built from there.
I too would like vdfuse to be 'snapshot' aware. Data reads/writes through snapshots requires chaining together the snapshots and its parents, and so on recursively. vdfuse as is written will only (I think) work on a 'parent' file. Maybe there is another, higher level, API provided by VBOx to 'traverse' the vdi files. After all, VBoxmanage clonehd mySnapshot.vdi does the 'right thing' in that as it clones, it 'flattens/merges' the vdi file chain. I could strace (or look at sources!) the clonehd operation, but it might be hairy.
Anyone actually had the VM running for which the vdi file 'fused' is its 'harddisk' while fusing it also in the host? Is it a disaster?
Kudos to the developers of vdfuse, great effort.
-
- Posts: 7
- Joined: 30. Mar 2011, 20:36
- Primary OS: Ubuntu 8.04
- VBox Version: OSE other
- Guest OSses: windows linux
Re: Discuss: Mount any VBox-compatible disk image on the host
Poking around the 4.0.4 OSE source codebase, I stumbled on
src/VBox/ImageMounter/VBoxFUSE
The single .cpp file has a main, so I guess is intended to become a tool 'VBoxFUSE' . I don't have such a binary on vbox installation (which was a straight apt-get install virtualbox-4.0)
Perhaps Sun/Oracle were intending to produce a tool similar to vdfuse ????
Anyone shed any light on this??
src/VBox/ImageMounter/VBoxFUSE
The single .cpp file has a main, so I guess is intended to become a tool 'VBoxFUSE' . I don't have such a binary on vbox installation (which was a straight apt-get install virtualbox-4.0)
Perhaps Sun/Oracle were intending to produce a tool similar to vdfuse ????
Anyone shed any light on this??
-
- Posts: 7
- Joined: 30. Mar 2011, 20:36
- Primary OS: Ubuntu 8.04
- VBox Version: OSE other
- Guest OSses: windows linux
Re: Discuss: Mount any VBox-compatible disk image on the host
Well, to further my last but two post, the bit about Snapshots...
vdfuse-v82a DOES follow snapshots!!! Well, one at least. There's a -s differenceImage option that seems to be 'internal', i.e. is not in the usage.
Given a 'base' vdi file and a difference vdi (you can infer the timeline from the .vbox file for the VM), vdfuse works great. I have two vdfuse processes running, and so two 'access points' from which I can mount partitions. I can clearly see some diffs in my NTFS partitiion before and after some VM activity.
Perhaps this is fragile, I am just reporting that it 'seems' to work on cursory glance.
vdfuse-v82a DOES follow snapshots!!! Well, one at least. There's a -s differenceImage option that seems to be 'internal', i.e. is not in the usage.
Given a 'base' vdi file and a difference vdi (you can infer the timeline from the .vbox file for the VM), vdfuse works great. I have two vdfuse processes running, and so two 'access points' from which I can mount partitions. I can clearly see some diffs in my NTFS partitiion before and after some VM activity.
Perhaps this is fragile, I am just reporting that it 'seems' to work on cursory glance.
-
- Posts: 1
- Joined: 20. Apr 2011, 08:12
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: W2003 -32bit
Re: Discuss: Mount any VBox-compatible disk image on the host
Have a proble when ranning:
./vdfuse - f 124.vdi /mnt/vdi
ore
./vdfuse - f 124.vdi /mnt/vdi
vdfuse version: 80 and 82a
Image 124.vdi in the same directory
permitions to group fuse -YES
PROBLEM
ERROR: a single mountpoint must be specified
What is it?
./vdfuse - f 124.vdi /mnt/vdi
ore
./vdfuse - f 124.vdi /mnt/vdi
vdfuse version: 80 and 82a
Image 124.vdi in the same directory
permitions to group fuse -YES
PROBLEM
ERROR: a single mountpoint must be specified
What is it?
-
- Posts: 1
- Joined: 16. Dec 2011, 01:56
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: WinXP
Re: Discuss: Mount any VBox-compatible disk image on the hos
Gordboy, just a quick THANK YOU for your vdfuse-v82a program. You turned a file copy procedure that would have taken hours (and kept failing) into one that took minutes.
If there are any other noobs like me who are using Ubuntu 10.4, they might benefit from the exact procedure I used:
To install the required files for compilation:
I edited /etc/fuse.conf so that "user_allow_other" was not commented out. I also chmod'ed fuse.conf to 777 (probably overkill).
Then as per README.gord
I already had this directory on my system: /mnt/vdi
So:
Then I created another directory in /mnt (I just called it "test" because I had no idea what I was doing, and didn't expect this to work).
Then:
The disk didn't show up as a disk in Nautilus, but I could navigate to /mnt/test and drag files out of that directory.
Super awesome.
If there are any other noobs like me who are using Ubuntu 10.4, they might benefit from the exact procedure I used:
To install the required files for compilation:
Code: Select all
sudo apt-get install libfuse-dev
Then as per README.gord
Code: Select all
sh vdbuild_new include/ vdfuse-v82a.c
So:
Code: Select all
sudo vdfuse-v82a -r -f ~/.VirtualBox/Machines/WinXP/Music.vdi /mnt/vdi
Then:
Code: Select all
sudo mount -o loop,ro /mnt/vdi/Partition1 /mnt/test
Super awesome.
-
- Posts: 3
- Joined: 14. Mar 2011, 15:02
- Primary OS: Ubuntu other
- VBox Version: PUEL
- Guest OSses: Windows 7, Windows XP
- Location: Scotland
Re: Discuss: Mount any VBox-compatible disk image on the hos
Hi Guys
Just to say I won't be maintaining vdfuse-v82a any more, since those nice people at Debian and Ubuntu are now maintaining their own version, which is the same as mine or better.
sudo apt-get install virtualbox-fuse
will get you their version.
Just to say I won't be maintaining vdfuse-v82a any more, since those nice people at Debian and Ubuntu are now maintaining their own version, which is the same as mine or better.
sudo apt-get install virtualbox-fuse
will get you their version.
-
- Posts: 23
- Joined: 29. Dec 2011, 08:26
- Primary OS: Other
- VBox Version: OSE Fedora
- Guest OSses: Ubuntu
Re: Discuss: Mount any VBox-compatible disk image on the hos
@gordboy It is a shame you are discontinuing work on vdfuse. I don't see any source packages on the Debian site, so there is no way for me to compile their version on my CentOS box. Maybe if you have some time you can tell me why I'm not able to compile your version. I have the fuse-devel and latest Virtualbox headers as per the instructions.
[root@VMserver vdfuse-v82a]# sh vdbuild_new include/ vdfuse-v82a.c
vdfuse-v82a.c:84: error: unknown field ‘cbSize’ specified in initializer
vdfuse-v82a.c:84: warning: missing braces around initializer
vdfuse-v82a.c:84: warning: (near initialization for ‘vdErrorCallbacks.Core’)
vdfuse-v82a.c:85: error: unknown field ‘enmInterface’ specified in initializer
vdfuse-v82a.c: In function ‘main’:
vdfuse-v82a.c:265: warning: passing argument 5 of ‘VDInterfaceAdd’ makes integer from pointer without a cast
include/VBox/vd-ifs.h:143: note: expected ‘size_t’ but argument is of type ‘void *’
Success!
[root@VMserver vdfuse-v82a]# ./vdfuse-v82a --help
bash: ./vdfuse-v82a: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Maybe it is expecting my libraries to be in a different place than they are and can be corrected with a simple argument like LDPATH= at compile time?
[root@VMserver vdfuse-v82a]# sh vdbuild_new include/ vdfuse-v82a.c
vdfuse-v82a.c:84: error: unknown field ‘cbSize’ specified in initializer
vdfuse-v82a.c:84: warning: missing braces around initializer
vdfuse-v82a.c:84: warning: (near initialization for ‘vdErrorCallbacks.Core’)
vdfuse-v82a.c:85: error: unknown field ‘enmInterface’ specified in initializer
vdfuse-v82a.c: In function ‘main’:
vdfuse-v82a.c:265: warning: passing argument 5 of ‘VDInterfaceAdd’ makes integer from pointer without a cast
include/VBox/vd-ifs.h:143: note: expected ‘size_t’ but argument is of type ‘void *’
Success!
[root@VMserver vdfuse-v82a]# ./vdfuse-v82a --help
bash: ./vdfuse-v82a: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Maybe it is expecting my libraries to be in a different place than they are and can be corrected with a simple argument like LDPATH= at compile time?
-
- Posts: 23
- Joined: 29. Dec 2011, 08:26
- Primary OS: Other
- VBox Version: OSE Fedora
- Guest OSses: Ubuntu
Re: Discuss: Mount any VBox-compatible disk image on the hos
For anyone following this thread, I found some source code from the Open SUSE group here: https://build.opensuse.org/package/requ ... ualization