VirtualBox VERR_ACCESS_DENIED 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.
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 &quot;rootless&quot; 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:


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