From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 26 00:52:20 2011 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 6635F106566B for ; Tue, 26 Jul 2011 00:52:20 +0000 (UTC) (envelope-from jsciulli2003@yahoo.com) Received: from nm11.bullet.mail.ne1.yahoo.com (nm11.bullet.mail.ne1.yahoo.com [98.138.90.74]) by mx1.freebsd.org (Postfix) with SMTP id 1E9D88FC15 for ; Tue, 26 Jul 2011 00:52:19 +0000 (UTC) Received: from [98.138.90.53] by nm11.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jul 2011 00:52:19 -0000 Received: from [98.138.88.236] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 26 Jul 2011 00:52:19 -0000 Received: from [127.0.0.1] by omp1036.mail.ne1.yahoo.com with NNFMP; 26 Jul 2011 00:52:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 598142.11637.bm@omp1036.mail.ne1.yahoo.com Received: (qmail 55330 invoked by uid 60001); 26 Jul 2011 00:52:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1311641539; bh=Lq99ocyrt97wdSyKksqdrz+knJcNt39qyZ+EsWaEZGw=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=TGbwsVd53HFfflxnCIkVLcPJXTGYUbpjLld/2KDqE8AgiN8omg0dBCE9yhDwSA09wetdUfDd18zX8UAI5FbjD7txoGp4Tpv5OZrQAYq7WZ6PEUKQiEZ4pEaVmxtbqHWrbJ3w8t3gKm9Oeq6DfgTldC6679u6ZH4T8jH4+xVTQRk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=WTS81oRndizb6/jkhjnT5dLfq4HSUw16cbti/gWA6fEejdl08h0L+7Wg6rljqsXndOUeF5fQyj1+aJVc5grfoAb8K4qrelytzTUXdeIBjl2vFqCPUXtBGyHnKiWeNq61JPa2ac6xwdEWWbrvDfeU5MieVJ1yoZtGUiKvnyCyFiQ=; X-YMail-OSG: v3tGJnoVM1mUpRcCU1y8oDJ7DM2tW_eMFe0YXn7kl6v1kn6 qgKTrkstELr4zKEYwXLDLomS8Ajv1Ph7Xgp1NMokGcynElXyg0v2JmIge1jh xaTxSkt1p6t6FjZxE0_UYO8sxv0khBFwpjPkH4a_rQcIeh4rGYIrkAe8yxXf 6ljitgSvqxg8AozMJmNjbOQtphks9h_qL.G60f_E6Cc8aUmmDIlp0sghS1_i 5049NP4OYU_FgtaM9Hhhw65G2HeOunIKueaAb9W9BAPErv_EWKhtGAcNdJb. KLZHd.loBUje6fCVxsmRIgmdXdGJe62vaaqbw9_21j71swfZL.4mxnu2DmTD dH8kFjE6s7GycuCM- Received: from [96.234.107.70] by web122305.mail.ne1.yahoo.com via HTTP; Mon, 25 Jul 2011 17:52:19 PDT X-Mailer: YahooMailClassic/14.0.3 YahooMailWebService/0.8.112.310352 Message-ID: <1311641539.51211.YahooMailClassic@web122305.mail.ne1.yahoo.com> Date: Mon, 25 Jul 2011 17:52:19 -0700 (PDT) From: Joe Sciulli To: freebsd-emulation@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: mount vdi on host 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: Tue, 26 Jul 2011 00:52:20 -0000 --- On Mon, 7/25/11, Brandon Gooch wrote: From: Brandon Gooch Subject: Re: mount vdi To: "Andrey V. Elsukov" Cc: "Joe Sciulli" , freebsd-emulation@freebsd.org, = nox@jelal.kn-bremen.de Date: Monday, July 25, 2011, 4:31 PM 2011/7/25 Andrey V. Elsukov : > On 25.07.2011 10:18, Joe Sciulli wrote: >> Is it possible to mount virtualbox vdi file on the FreeBSD host? =A0This= appears to be doable on >> windows and linux hosts, which basically is done in two steps: 1. find o= ffset in the image. 2. >> mount the image with that offset. >> >> I'm trying to do the same thing on FreeBSD, and found the undocumented a= nd deprecated command >> still works: >> >> VBoxManage internalcommands dumphdinfo freebsd_home.vdi >> >> I got the following for the virtual disk image holding the /home (no roo= t hence no MBR) disk for >> a FreeBSD guest: >> >> Header: offBlocks=3D4096 offData=3D28672 >> >> Then attempt to mount it: >> >> mdconfig -a -t vnode -f /tmp/freebsd_home_56.vdi -u 0=20 mount /dev/md0 /tmp/aaa/=20 mount -t cd9660 /dev/md0 /tmp/aaa/ >> >> unfortunately both the above two mount commands failed with "Invalid arg= ument". =A0I tried >> skip=3D28672 to no avail as well. =A0Anything did I do wrong? > > I have not any Vbox images with fixed size, but i tried this: > # mdconfig -f 10G_GPT_UFS.vdi > # gnop create -v -o 41472 /dev/md0 > > where 41472 is offData value. After that md0.nop was tasted and reports a= bout invalid GPT. > So, i think if your image is fixed size disk yout can try this method and= mount UFS (not cd9660). > > -- > WBR, Andrey V. Elsukov There was a CFT sent out a while back about a fuse module for mounting vdi images: http://lists.freebsd.org/pipermail/freebsd-emulation/2010-September/007964.= html Not sure about the state of this now though... -Brandon =0A Thanks for your replies.=A0=20 I tried=20 mdconfig -f freebsd_home.vdi gnop create -v -o 28672 /dev/md0 Indeed /dev/md0.nop etc were created.=A0 But mounting with the following co= mmands still yielded the dreaded "Invalid argument" error: mount /dev/md0.nop /tmp/aaa/=20 =0Amount -t ufs /dev/md0.nop /tmp/aaa/ One thing interesting is, in the gnop command, if I change 28672 to anythin= g else such as 28671 or 28673 or whatever, that gnop command would fail wit= h: gnop: Invalid offset for provider md0. so that suggests the offset is correct.=A0 It's just that how to mount it. The vdi is a variable size disk in virtualbox.=A0 But I had shutdown virtua= lbox and copied it to another file before mdconfig on it.=A0=20 I looked closer at virtualbox-ose-fuse.shar Brandon linked, it appears to b= e hardcoded to work with VirtualBox-3.2.8-OSE, while I only have VBoxGuestA= dditions_4.0.12 as in the ports tree. Any more idea, thanks.