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.
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.
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.
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 😉
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.
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.
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.
hi, so can you then install osx in a hyper v vm while windows is running in bootcamp? i.e. so you don’t need to boot into osx at all and still dev Xamarin ios apps etc?
There are hacks to get OSX running in VMWARE and VIRTUALBOX. Hyper-v is not supported.