Cannot run docker based Windows container in Windows 10 VirtualBox VM on Mac OS X host

1

I get the following error when I try to run a docker-based Windows container using the following commands:

docker pull microsoft/dotnet-framework
docker run -it microsoft/dotnet-framework cmd

docker: Error response from daemon: container 31112532fbefca415cfb10134612cf4467c084e93e699b7caa320ca60f5df266 encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000)

Docker for Windows is set up in a Windows 10 Pro VM (using VirtualBox) on a Macbook Pro (Intel based, 2016, OS X El Capitan). In Docker's settings, I switched to using Windows containers. Is there a specific issue with OS X? Because I am able to make this work in a PC running Windows 10 Pro.

windows
macos
docker
virtualbox
hyper-v
asked on Stack Overflow Aug 12, 2017 by Web User

1 Answer

3

When running Docker Windows containers on Windows 10, Hyper-V is required. This won't work with VirtualBox because VirtualBox does not support nested virtualization.

Instead you should Windows Server 2016 (WS2016) in the VirtualBox VM. WS2016 can run Docker Windows containers with process isolation, which doesn't require Hyper-V.

You can trial WS2016 for free and Stefan Scherer maintains a set Vagrant scripts that automate setup and configuration.

answered on Stack Overflow Aug 13, 2017 by friism

User contributions licensed under CC BY-SA 3.0