1

I want to run windows executables in a docker container.

I cannot run windows containers in linux docker:

$ docker run --rm microsoft/nanoserver
Unable to find image 'microsoft/nanoserver:latest' locally
latest: Pulling from microsoft/nanoserver
bce2fbc256ea: Pulling fs layer 
b1b0c61be11f: Pulling fs layer 
docker: image operating system "windows" cannot be used on this platform.

I tried running a windows 10 VM and installing docker for windows in there. The installation went fine, but starting docker yields this error:

Unable to start: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 'MobyLinuxVM' failed to start.

Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running.

'MobyLinuxVM' failed to start. (Virtual machine ID E8803091-3163-4906-8547-F3422532D501)

The Virtual Machine Management Service failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running (Virtual machine ID E8803091-3163-4906-8547-F3422532D501).
at Start-MobyLinuxVM, <No file>: line 300
at <ScriptBlock>, <No file>: line 395
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 77
at Docker.Actions.<>c__DisplayClass16_0.<Start>b__0() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 61
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

I have verified that hyper-v is in fact enabled.

Is it possible to have a linux host running a windows VM running docker to run windows executables in a container, or am I trying to do something impossible?

0

Your second problem (‘MobyLinuxVM’ failed to start) can be solved by running this command in powershell, it helped me. Use 64/32bit powershell as your windows is. Then reboot.

bcdedit /set hypervisorlaunchtype Auto

souce (https://forums.docker.com/t/mobylinuxvm-failed-to-start/15175/7)

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.