Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Oct 2010 14:10:41 +0300
From:      Thanassis Tsiodras <ttsiodras@gmail.com>
To:        freebsd-emulation@FreeBSD.org
Subject:   VirtualBox can't boot a Linux residing in the same hard disk - operation not permitted
Message-ID:  <AANLkTikFn3dbkWXPFj0-zGQzhJD=W7sUFTUj1Mu8P_WK@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikFn3dbkWXPFj0-zGQzhJD=W7sUFTUj1Mu8P_WK>