7

I am trying to install Windows 10 on a partition with this Virtualbox method, where I create a vmdk link to the partition and use it as the drive, run the installer and then reboot.

This worked fine on a device running Mavericks, but on one with El Capitan does not work, and prints out a VERR_ACCESS_DENIED

VBoxManage internalcommands createrawvmdk -filename ~/RawWinDisk.vmdk -rawdisk /dev/disk0 -partitions 1,4

This is supposed to make the vmdk file. I did do a chown to /dev/disk0, disk0s1 and disk0s4. I also tried a chmod -R 777 on them to see if it helped, but it still did not work. Running command as sudo does not work either.

John K
  • 2,072
  • 3
  • 24
  • 40
  • 1
    guessing you hit SIP. Did you try with it off? – Tetsujin Nov 27 '15 at 21:43
  • @Tetsujin Please explain what SIP is. I didn't yet meet up with such term – John K Nov 27 '15 at 21:44
  • System Integrity Protection - see http://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-os-x-10-11 – Tetsujin Nov 27 '15 at 21:45
  • I'm trying to reproduce this on 5.0.10 r104061 - I don't seem to be wrapping my brain around why the Mac raw devices are being used by the guest OS. – bmike Nov 27 '15 at 21:48
  • @Tetsujin Disabling SIP actually did work. Please put it in an answer so this question can be answered – John K Nov 28 '15 at 14:18
  • 1
    Ah, glad it helped - putting together a [rather short] answer :) – Tetsujin Nov 28 '15 at 14:19

3 Answers3

6

I think you may be hitting El Capitan's System Integrity Protection [SIP] which is preventing access..

Borrowed from How do I disable System Integrity Protection (SIP) AKA "rootless" on OS X 10.11, El Capitan? ...

Apple's documentation covers disabling SIP, About System Integrity Protection on your Mac.

An article on lifehacker.com lists these steps:

  1. Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
  2. Click Utilities > Terminal.
  3. In the Terminal window, type in csrutil disable and press Enter.
  4. Restart your Mac.
Tetsujin
  • 115,663
5

Try:

sudo chown ${USER} /dev/disk0s4
sudo chmod 660  /dev/disk0s4
chmod 600 ~/RawWinDisk.vmdk

after each MacOS restart I need again chown /dev/disk0s4 to start Windows VM normally.

Andrew
  • 151
4

I have been booting my bootcamp partition via vbox since probably OSX Lion. when SIP came along, I had to adjust my vbox run script to do the chmod's as described elsewhere, but today I had to re-create my pointer VMDK (VBoxManage internalcommands createrawvmdk...) because my drive numbering changed (/dev/diskN) and I could not without temporarily disabling SIP... no chmod'ing would make a difference. After creating the new VMDK, I reenabled SIP, and am back to chmod'ing before virtual startup/after each host reboot.

bmike
  • 235,889
Aimless
  • 41