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 host

Postby NeBlackCat » 26. May 2011, 10:27

NeBlackCat wrote:Anyone know if it's possible to copy the vdfuse program from an OSE installation to a PUEL one, and use it to mount VHDs?


To answer my own question, yes it is. You just extract the single vdfuse executable from its distribution package (eg. virtualbox-ose-fuse.deb on Debian derivatives) into somewhere on the path of your PUEL system . It just seems to use VirtualBox's VBoxDDU.so library, which seems the same on both PUEL and OSE (as far as vdfuse is concerned anyway).

But I'm finding vlosetup (with its vloop.ko driver) from the VBoot project to be a far superior tool for mounting/manipulating virtual and raw disk image files independently of (or together with) VirtualBox.

Anyone else using that?
NeBlackCat
 
Posts: 154
Joined: 3. Aug 2008, 13:37

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

Postby tobermory » 27. May 2011, 20:07

Can you expand on your use of vlosetup? I am looking to use vdfuse as a way of traversing/acquiring the 'dd image' inside a .vdi file. What makes vdfuse great is that Snapshot merges are transparent to the user. Can VBoot offer similar functionality?
tobermory
 
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

Postby NeBlackCat » 27. May 2011, 23:47

afaik vlosetup also supports snapshotted virtual disks, ie. you pass the snapshot and parent filenames together on the command line and get the whole thing. I haven't used that myself though. I don't think it can read .vbox files to automatically find parents if you only specify the child.

I just wanted a way to mount virtual and raw disk images in Linux, such that they worked like physical disks in all respects, including with the GUI disk management tools like Gnome Disk Utility and GParted (couldn't get vdfuse-mounted ones to do that).

What I liked about it was that the GUI tools work, it handles loop/partition mounting automatically, it can also create/resize virtual disks, it supports raw images (partition and full disk) as well as VDI/VHD/VMDK, and doesn't require VirtualBox to be installed for any of that.

So I can now standardise on VHD files as my imaging format of choice, and have the tools to manipulate them (including differenced images) on both Linux and Windows 7/Server hosts, as well as being able to boot into them on both physical (with VBoot and/or Windows 7) and virtual (with VirtualBox) machines. That is a first!

On the downside, the versions of kernels currently supported are limited. However the next version will apparently work in FUSE mode too. That is, if you have a supported kernel it works inside of it, otherwise it works in FUSE mode.

It seems to be mix of code from losetup, kpartx, vboxmanage, and virtualbox itself, all wrapped up into one. IIRC they're also planning to add more disk image related functionality from vboxmanage (eg. convertfromraw), and support encrypted images (within Truecrypt containers).

Here is the help:

Code: Select all   Expand viewCollapse view
> vlosetup -h

Usage:
 vlosetup loop_device                             give info
 vlosetup -a | --all                              list all used
 vlosetup -d | --detach <loopdev> [<loopdev> ...] delete
 vlosetup -f | --find                             find unused
 vlosetup -c | --set-capacity <loopdev>           resize
 vlosetup -j | --associated <file> [-o <num>]     list all asso'ed with <file>

 vlosetup --createhd <filename>.vhd|.vdi|.vmdk --sizemeg <num of megabytes>
  create a new virtual diskfile of given megabytes, without setup to loopdev

 vlosetup --creatediff <diff_filename> <parent_filename> [<parent1_filename> <parent2_filename> ...]
  create a differencing disk file to a base image or another differencing disk.

 vlosetup [ options ] {-f|--find|loopdev} <file>  setup a loopdev with file

Options:
 -h | --help              this help
 -o | --offset <num>      start at offset <num> into file
      --sizelimit <num>   loop limited to only <num> bytes of the file
 -p | --pass-fd <num>     read passphrase from file descriptor <num>
 -r | --read-only         setup read-only loop device
      --show              print device name (with -f <file>)
 -i | --immutable         mount disk as immutable, changes are discarded
 -v | --verbose           verbose mode
NeBlackCat
 
Posts: 154
Joined: 3. Aug 2008, 13:37

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

Postby kihjin » 30. May 2011, 08:07

Kind of surprised that no one has noticed this, but vdfuse no longer works for 4.0.8 OSE AND it cannot be built. The VBoxHDD.h header file is gone, "vd.h" needs to be used instead. The VDCreate function takes another parameter, the VDTYPE, which you can use VDTYPE_HDD:

Line 267 Before: if (RT_FAILURE(VDCreate(&vdError, &hdDisk)))

Line 267 After: if (RT_FAILURE(VDCreate(&vdError, VDTYPE_HDD, &hdDisk)))
kihjin
 
Posts: 71
Joined: 18. Nov 2008, 21:30
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Ubuntu, Windows XP

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

Postby fixedwheel » 5. Jul 2011, 10:00

kihjin wrote:Kind of surprised that no one has noticed this, but vdfuse no longer works for 4.0.8 OSE AND it cannot be built. (...)

JFTR ...
http://packages.debian.org/virtualbox-fuse
http://packages.ubuntu.com/virtualbox-fuse
fixedwheel
Volunteer
 
Posts: 1699
Joined: 13. Sep 2008, 02:18

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

Postby StarNamer » 6. Jul 2011, 14:23

As far as I can see, the vloop code from VMLite is not Open Source. In any event, they don't seem to have the source available for download and simply provide versions for Ubuntu (unless I just haven't found it).

Does an Open Source version exist? If so, where can I get it?

I've been mounting VHD disks under Windows 7 for some time when needing to fix/extract something and would like to be able to do the same thing under Linux (with all supported formats). I don't need/want the vboot capability, just the vloop driver. If an Open Source version doesn't exist, I may start looking as hacking something together... :)
StarNamer
 
Posts: 5
Joined: 30. Mar 2008, 01:52

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

Postby ChipMcK » 28. Oct 2013, 16:52

StarNamer wrote:Does an Open Source version exist? If so, where can I get it?


refer to vdfuse

Best
ChipMcK
Volunteer
 
Posts: 604
Joined: 20. May 2009, 02:17
Location: U S of A
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, Linux

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

Postby Emile » 11. Nov 2013, 17:43

virtualbox-fuse has been removed from Debian testing/jessie. I asked the Debian package maintainer, it won't come back.
Emile
 
Posts: 12
Joined: 8. Nov 2013, 23:33

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

Postby ChipMcK » 12. Nov 2013, 03:26

in the OSX Host forum, check out vdfuse.

The information may be of use.

Best
ChipMcK
Volunteer
 
Posts: 604
Joined: 20. May 2009, 02:17
Location: U S of A
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, Linux

Previous

Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: Bing [Bot] and 10 guests