CFT: vdfuse port (was: Re: Mounting VirtualBox vdi files [SEC=UNCLASSIFIED])

Juergen Lock nox at jelal.kn-bremen.de
Thu Sep 2 20:27:58 UTC 2010


(Yes this thread is a bit old but now I may have a solution...)

In article <20100706032057.GA15827 at 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


More information about the freebsd-emulation mailing list