VirtualBox can't boot a Linux residing in the same hard disk - operation not permitted

Thanassis Tsiodras ttsiodras at gmail.com
Sat Oct 2 11:36:40 UTC 2010


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


More information about the freebsd-emulation mailing list