From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 6 15:58:32 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 BC280106566C for ; Tue, 6 Jul 2010 15:58:32 +0000 (UTC) (envelope-from mirya@zoc.com.ua) Received: from ex.volia.net (ex.volia.net [82.144.192.10]) by mx1.freebsd.org (Postfix) with ESMTP id 782DD8FC12 for ; Tue, 6 Jul 2010 15:58:32 +0000 (UTC) Received: from em.volia.net ([82.144.192.9]) by ex.volia.net with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1OW9ek-000C7t-Df for freebsd-emulation@freebsd.org; Tue, 06 Jul 2010 18:01:54 +0300 Received: from revelationless-overpass.volia.net ([77.122.14.168] helo=[192.168.0.28]) by em.volia.net with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1OW9ek-00054l-CN for freebsd-emulation@freebsd.org; Tue, 06 Jul 2010 18:01:54 +0300 From: Kyryll A Mirnenko aka Mirya Organization: ZOC To: freebsd-emulation@freebsd.org Date: Tue, 6 Jul 2010 18:01:51 +0300 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201007061801.52752.mirya@zoc.com.ua> X-Volia-Original-IP: 77.122.14.168 Subject: Re: Mounting VirtualBox vdi files 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, 06 Jul 2010 15:58:32 -0000 If you're creating the VM from scratch, you may use raw file-backed disk image along with VMDK format wrapper. You may create a sparse file # truncate -s 2G img or a preallocated one # dd if=/dev/zero of=img bs=1m count=2048 , then create a character device for it # mdconfig -a -t vnode -f img -u 4 , and wrap it with a vmdk container # VBoxManage internalcommands createrawvmdk -filename Img.vmdk -rawdisk /dev/md4 After that you may use Img.vmdk as any other disk image in VirtualBox, and mount /dev/md4* from the host machine. Just remember you'll need to run mdconfig after reboot, the md* devices are not preserved magically, and umount /dev/md4* before starting VBox. That's how i work with -current FreeBSD snapshots - they're cross-compiled and cross-installed in the host system (which is faster), then run in the VBox. -- Regards, Mirya ICQ #313898202