Setup Boot Camp with hyper-V support

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 ..

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.

(gcim Win32_ComputerSystem).HypervisorPresent

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

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.

About erictummers

My work as a recruited developer changes almost every month. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Development, Tooling and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s