Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Sep 2010 22:24:31 +0200 (CEST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        alex.wilkinson@dsto.defence.gov.au
Cc:        freebsd-emulation@freebsd.org
Subject:   CFT: vdfuse port (was: Re: Mounting VirtualBox vdi files [SEC=UNCLASSIFIED])
Message-ID:  <201009022024.o82KOVni007042@triton8.kn-bremen.de>
In-Reply-To: <20100706032057.GA15827@stlux503.dsto.defence.gov.au>
References:  <alpine.BSF.2.00.1007052053090.9243@wonkity.com> <20100706032057.GA15827@stlux503.dsto.defence.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
(Yes this thread is a bit old but now I may have a solution...)

In article <20100706032057.GA15827@stlux503.dsto.defence.gov.au> you write:
>    0n Mon, Jul 05, 2010 at 08:58:58PM -0600, Warren Block wrote: 
>
>    >Is there any hope of a utility like mdconfig that would allow mounting a 
>    >vdi file directly?
>    >
>    >There's a tantalizingly-named ImageMounter/VBoxFUSE, which is probably 
>    >not what that implies.
>    >
>    >It would be great to be able to access vdi files without having to 
>    >waste time and space converting them to raw image files.
>
>Try: http://libguestfs.org/

Well that looks like major work to port, but there is a much simpler
fusefs tool in debian called vdfuse that I now finally made a port
of.  I don't know how stable this is on FreeBSD or if there still
may be bugs, so please give this a good test and post your results
here.  Here's a simple example:

	# vdfuse -r -f ~nox/.VirtualBox/HardDisks/win7-64.vdi /mnt
	# mdconfig -a -f /mnt/Partition2 -o readonly
	md0
	# mount -o ro -t ntfs /dev/md0 /mnt2
	# ls -l /mnt2
	...
	# umount /mnt2
	# mdconfig -d -u 0
	# umount /mnt

 I was also able to write onto ntfs using sysutils/fusefs-ntfs, tho
I had to apply a fix to sysutils/fusefs-kmod from this PR first to
get rid of a panic:

	http://www.freebsd.org/cgi/query-pr.cgi?pr=149674

	# vdfuse -a -f ~nox/.VirtualBox/HardDisks/win7-64.vdi /mnt
	# mdconfig -a -f /mnt/EntireDisk
	# ntfs-3g /dev/md0s2 /mnt2
	# ls -l /mnt2
	...

 Of course only do any of this while the guest is completely shut
down...  (That's because at least all the `regular' filesystems
cannot be mounted more than once at a time or you'll get corruption.)

 And here is the shar:

	http://people.freebsd.org/~nox/tmp/virtualbox-ose-fuse.shar

 Happy testing! :)
	Juergen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009022024.o82KOVni007042>