From owner-freebsd-emulation@FreeBSD.ORG Thu Sep 2 20:27:58 2010 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C0810656FF for ; Thu, 2 Sep 2010 20:27:58 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 667028FC0A for ; Thu, 2 Sep 2010 20:27:58 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 3C0921E00077; Thu, 2 Sep 2010 22:27:57 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.3) with ESMTP id o82KOWvZ007043; Thu, 2 Sep 2010 22:24:32 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id o82KOVni007042; Thu, 2 Sep 2010 22:24:31 +0200 (CEST) (envelope-from nox) Date: Thu, 2 Sep 2010 22:24:31 +0200 (CEST) From: Juergen Lock Message-Id: <201009022024.o82KOVni007042@triton8.kn-bremen.de> To: alex.wilkinson@dsto.defence.gov.au X-Newsgroups: local.list.freebsd.emulation In-Reply-To: <20100706032057.GA15827@stlux503.dsto.defence.gov.au> References: <20100706032057.GA15827@stlux503.dsto.defence.gov.au> Organization: home Cc: freebsd-emulation@freebsd.org Subject: CFT: vdfuse port (was: Re: Mounting VirtualBox vdi files [SEC=UNCLASSIFIED]) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2010 20:27:58 -0000 (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