From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 2 11:36:40 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 4F31B1065673 for ; Sat, 2 Oct 2010 11:36:40 +0000 (UTC) (envelope-from ttsiodras@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 03D3A8FC15 for ; Sat, 2 Oct 2010 11:36:39 +0000 (UTC) Received: by qyk8 with SMTP id 8so492843qyk.13 for ; Sat, 02 Oct 2010 04:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=3CmiPQgl0lGno1BFbnr33GK+St2JzPo7LZ3RqfiF6Hg=; b=uv5oQbm+RB+SejW/04RTwKEcQdoTjAeQBpoNupZc0w3TQa4uebo7qC3/ziWk262XcT 2S/fZQpiddTlqw8xPNVUt4MbBokjUC6RApCeWhERtgUyPUGRMRFVvXAz1j7SoOeTpYCv uZ8nwtjTxGAs3NFlpexB9pj9iZ0D+lMd3xzSI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=oStD3FMUaXMdzi2shDyhY7FrSsn0oPcCEjkpJSXvX57tKmMga7kmfOpeK/W9z4X9fp z48vp251AEJSxGqiWttoK3zygD9xLILLsgg3P1xJxQmMOofq6R+5B/Hkv9fXXJNbTMGP MZWqP7NFTXPOx8AevkiOdZ8Kbju9r6louL+uc= MIME-Version: 1.0 Received: by 10.229.215.67 with SMTP id hd3mr4859795qcb.74.1286017841393; Sat, 02 Oct 2010 04:10:41 -0700 (PDT) Received: by 10.229.232.146 with HTTP; Sat, 2 Oct 2010 04:10:41 -0700 (PDT) Date: Sat, 2 Oct 2010 14:10:41 +0300 Message-ID: From: Thanassis Tsiodras To: freebsd-emulation@FreeBSD.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: VirtualBox can't boot a Linux residing in the same hard disk - operation not permitted 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: Sat, 02 Oct 2010 11:36:40 -0000 Hi, everyone. I have a disk where I have installed both Linux and FreeBSD, under different partitions. From FreeBSD, I wanted to use VirtualBox to boot my Linux, which resides in a different partition of the same disk. I installed the latest Virtualbox from ports (3.2.8, r64453), and I tried to create a raw-access device: bash$ sudo VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WholeDisk.vmdk -rawdisk /dev/ad11 but unfortunately, I got... ERROR: VMDK: could not open raw disk file '/dev/ad11' and truss revealed that: bash$ sudo truss VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WholeDisk.vmdk -rawdisk /dev/ad11 2>&1 | grep ad11 open("/dev/ad11",O_RDONLY,0600) = 8 (0x8) open("/dev/ad11",O_RDWR,0600) ERR#1 'Operation not permitted' So it seems that VBoxManage attempted to get read-only access to the device, succeeded, then attempted to get RW access, and failed. I tried this under a root login too (i.e. not via sudo), just in case. No go. Security wise, I am at: bash$ sysctl kern.securelevel kern.securelevel: -1 Any ideas on what to try? Note that the reverse works: Linux has no problem giving VBoxManage raw access to the disk, even though the ext4 partition resides in the same disk. -- What I gave, I have; what I spent, I had; what I kept, I lost. -Old Epitaph