Windows – Run Boot Camp Windows10 partition inside VirtualBox

bootcampvirtualboxwindows

I have a separate Windows10 partition courtesy of Boot Camp Assistant.

I would like the option of cranking it up inside my OS X session using VirtualBox, as there are times I would like to use some Windows apps without doing a reboot.

I have found a few guides:

..but everything is rather out of date, referring to Windows 7.

I wonder whether maybe now the process is simpler?

Could anyone either detail or link to an updated process for Windows 10? (Or alternatively confirm one of the above as a best solution path…)


EDIT: putting up further research as I find it. Once I dig through it all I will upload my findings as an answer.

https://forums.virtualbox.org/viewtopic.php?f=8&t=19866&start=90#p290527
^ (mid-2014)

http://danielphil.github.io/windows/virtualbox/osx/2015/08/25/virtualbox-boot-camp.html <– better! Win10!

However following this guide I hit up against:
enter image description here

Maybe …

https://forums.virtualbox.org/viewtopic.php?f=8&t=58821&start=15#p343017 says: "I finally got this working for my Windows 10 Boot Camp install. You have to disable System Integrity Protection under recovery mode in order to get a write lock on /dev/disk0s1 (the EFI partition)."

?

http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/ <– this didn't fix it

https://www.virtualbox.org/ticket/7811 <– this did! But now I am here:

enter image description here

Googling gives https://askubuntu.com/questions/162148/virtualbox-machine-boots-to-efi-shell but turning off EFI as directed, now I get:

FATAL: No bootable medium loaded. System halted!

π


TODO: http://engineer.john-whittington.co.uk/2013/03/bootcamp-partition-virtual-boot-with-virtualbox/ ?

I've started a thread here: https://forums.virtualbox.org/viewtopic.php?f=8&t=75360

Best Answer

I also followed the guide at http://web.archive.org/web/20181103074214/http://danielphil.github.io/windows/virtualbox/osx/2015/08/25/virtualbox-boot-camp.html

I will add what challenges I had following that guide, but I was able to run my BOOTCAMP partition using VirtualBox, which is free, so I'm happy.

First, you should have installed:

  • Windows 10 x64 using the OS X Boot Camp assistant
  • VirtualBox 5.0.26 r108824

I also downloaded:

  • VBoxGuestAdditions_5.0.26.iso (I don't think this is necessary, but I did it just to be safe)

As far as Disabling SIP or System Integrity Protection on El Capitan (OS X 10.11), I skipped that part. It was not necessary in my case.

As far as setting drive permissions:

  1. I ran diskutil list to get a list of drives on my system, taking note of the drive number of the drive named EFI and the other one named BOOTCAMP, which in my case, the EFI drive was 1 and the BOOTCAMP drive was 4.
  2. I then ran the instructions to unmount my Bootcamp drive and set permissions so that VirtualBox could access the drive. According to danielphil, this needs to be performed each time one reboots.

    diskutil unmount /Volumes/BOOTCAMP

    sudo chmod 777 /dev/disk0s1 <--- This is the drive no. of the EFI disk

    sudo chmod 777 /dev/disk0s4 <--- This is the drive no. of the BOOTCAMP disk

As far as creating the VirtualBox image, the instructions are:

Run the following commands to create a VirtualBox disk image wrapper for >your HD. Substitute the 1,4 with the numbers of your EFI and BOOTCAMP >partitions as appropriate and put your OS X username in for >your_username_here. Make sure you are in the directory where you want to store the VirtualBox image, or you will have to move it later.

sudo VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename win10raw.vmdk -partitions 1,4
sudo chown your_username_here *.vmdk

As far as creating the VM, the guide was not so clear. Before I followed the instructions from the screenshots, I created a new virtual machine in VirtualBox, checking "Do not add a virtual hard disk".

creating the new virtual machine

Once created, I selected it and clicked on "Settings". At this point, I followed the screenshots in the guide. The only difference was that:

  • I did NOT check "Enable EFI (special OS only)"
  • I did NOT have the option to check "Enable VT-x/AMD-V"
  • I used the recommended base memory of 2048 MB, as I only have 8GB of memory
  • In the "Storage" tab under "Storage Tree", I had to:
    • click the "adds optical drive" icon under Controller:SATA to add the "VBoxGuestAdditions_5.0.26.iso" file I downloaded.
    • remove the "empty" image under Controller:SATA
    • Select the "Add IDE Controller" icon at the bottom
    • click the "adds hard disk" icon under Controller:IDE to add the vmdk file created