Hyper V Windows 10 Bootcamp



Microsoft Hyper-V must be off for Windows 10 to start up on a Mac using Boot Camp. If you try to boot into Windows 10 with Hyper-V turned on, you see only a black screen and Windows doesn't start. Take care if you install Microsoft Visual Studio 2015, because this software automatically enables Hyper-V. Enable Hyper-V to create virtual machines on Windows 10. Hyper-V can be enabled in many ways including using the Windows 10 control panel, PowerShell or using the Deployment Imaging Servicing and Management tool (DISM). This documents walks through each option. Forgetting that you can't do it because the support (technical and policy based) isn't there, what specifically in the Apple license agreement prohibits use of MacOS on Hyper-V.IF. you have installed Windows 10 or for that matter, Windows Server on Mac hardware?

Recently I picked up a Mac Book Air. It is a nice device, fast processor, lots of memory and fast hard drives. I am not to keen on using OS X so I decided to install Windows onto it. So I installed windows, loaded the drivers, installed all my applications and then went to install Hyper V to run up VM’s for different reasons. Instead of my smooth install and everything working out fine I get:

Hyper-V Cannot be installed: Virtualization is disabled in the firmware

Surely this is a mistake, I mean the machine is only a few years old, its an Intel MAC and WHAT??!?! So I check the task manager to see the enabled features on the Chip and sure enough the features is there, just disabled.

So close, yet so far away

So like any good IT person I figured a reboot would fix it, hit the reboot button and checked again and the issue remains. I know from previous experience that this usually means the features needs to be enabled in the BIOS, but that might as well be french on a MAC so what was I to do? I turned to Google to help find the answers and this is generally what I found:

  • If I installed OS X, the features were enabled. (So it is enabled during the boot process)
  • The general way to fix this issue on the internet was to dual boot with OS X. For any cold boot, I would boot into OS X and then use the startup disk facility to warm boot into windows.

Ok, so um, OK. Sometimes I cant get over what seems to be an acceptable solution on the internet. I mean lets stop for a minute and critically think about this. First up Pros and Cons

Pros

  • OS X is the best and you need nothing else ever! (Source: Fanboi)

Cons

  • I have to configure, update and maintain two Operating systems (Increased attack surface and potential for attack vectors)
  • I have to boot two operating systems for any cold boot situation (Double boot time, might as well have stuck with spinning rust)
  • I loose 38 – 40 GB of partition in my already small SSD to an operating system that I will rarely use. (That is two extra VM’s)
  • I own the hardware so for Apple (or anyone for that matter) to tell me it is only enabled under specific circumstances is garbage.

Right. So as we can see the Cons to this solution seem to be outweighing any OS X is the best argument. So next step in my critical thinking is to assess what I know to be true which is

Hyper
  • I can not enable the feature in BIOS unless I consider using a custom BIOS Firmware (Which I don’t want to do)
  • The feature is able to be turned on during the boot process, and under the right circumstances is enabled in Windows (So it isn’t impossible)
  • I want to use HyperV and not an alternative like Virtual Box because Hyper V is a type 1 hyper visor. (Its a thing – See http://searchservervirtualization.techtarget.com/tip/Virtualization-hypervisor-comparison-Type-1-vs-Type-2-hypervisors)

I tried may different things to try and resolve the issue including

  • Using a non UEFI boot image to see if legacy would enable the feature – Nope
  • Looking for a way to turn it on manually once the operating system was booted – Nope
  • More research

After some time looking into how it all works I found an alternative boot loader that could be used which promised that it could enable the feature under Windows. I have used alternative boot loaders before (I am looking at you Grub) so I figured it couldn’t hurt and was worth a go. The boot loader was called rEFInd and you can see its Sourceforge page at https://sourceforge.net/projects/refind/ and a great book about it at http://www.rodsbooks.com/refind/

Bootcamp upgrade windows 10Windows

So here are the steps I took to install it

  • Install Windows using the whole drive
  • Install OS X onto a USB drive
  • Boot into a OS X Recovery Environment (I installed OS X onto a USB drive, then held Option during the boot, selected recovery environment)
  • In a terminal in the Recover execute
  • Next reboot into OSX (You can actually do this via windows as well, more on that later)
  • Download rEFInd and modify the refind.conf-sample file that comes with the download and modify the following values
Hyper V Windows 10 Bootcamp
2
4
6
cd EFI
'c:Program Files (x86)Notepad++notepad++.exe'refind.conf

For development I’m using Windows in a Parallels VM on my MacBook Pro. To use docker on Windows I need to enable Hyper-V.

Parallels has an option called “nested virtualisation” where the guest OS can do virtualisation. For this you’ll need a Pro subscription, which I don’t have. This means I cannot use nested virtualisation.


My only option is setting up Boot Camp and boot native into Windows. My hurdles steps are listed below.

Disk space

The first step in the Boot Camp Assistant is setting up the Boot Camp partition. I want to assign 80Gb since I’m installing Windows, Visual Studio, Docker and some other development stuff. My disk reports 105Gb of free space so that’s okay .. not ..

Bootcamp Windows 10 Virtualization Disabled

The assistant lets me assign max 48 Gb. What is going on? Seems that local time machine backups secretly eat into your available disk space. Luckily there is a way of removing these hidden files. The assistant now lets me create the partition of 80Gb.

Remove partition

The ISO file I downloaded from the msdn subscriptions page was incompatible and resulted in an error. Looks like only the commercial version of the ISO is supported. Now I have a corrupted Boot Camp partition. To remove these I used Disk Util as described here.


After downloading the supported ISO file and rebooting (have you tried turning it off and on again) the Boot Camp assistant did the job.

Installation

After a reboot I was presented the Windows 10 installation setup. Boot Camp installed the drivers after the first login. Another reboot and Visual Studio, Docker, … all installed without issues. Happy developer 😉

Cold boot

The next day I started my MacBook into Windows and docker crashed…
The logfile presented me with this:

Virtual machine ‘MobyLinuxVM’ could not be started because the hypervisor is not running (Virtual machine ID ~some GUID~).
The following actions may help you resolve the problem:
1) Verify that the processor of the physical computer has a supported version of hardware-assisted virtualization.
2) Verify that hardware-assisted virtualization and hardware-assisted data execution protection are enabled in the BIOS of the physical computer. (If you edit the BIOS to enable either setting, you must turn off the power to the physical computer and then turn it back on. Resetting the physical computer is not sufficient.)
3) If you have made changes to the Boot Configuration Data store, review these changes to ensure that the hypervisor is configured to launch automatically.

Google suggested to run this command to check if Hypervisor was activated/present. The answer was False.

Bootcamp Drivers For Windows 10

There seems to be a virtualisation bug that disables hyper-v on a cold boot. For now I’ll be booting into macOS and then booting into Windows. The command above will return True this way and everything works.

Aftermath

Hyper V Windows 10 Bootcamp 64-bit

The option of running Windows in Parallels still interested me. By installing a trial version of Parallels Desktop I was able to start the Boot Camp Windows installation from within macOS. In the trial version all options are available, so I used the nested virtualisation option. The machine creation took some time while installing the Parallels Tools. But right after the startup (again) docker crashed.

Docker also crashed when native booted into Windows. This was resolved after uninstallation of the Parallels Tools. No Parallels for now.