Docker Community Forums

Share and learn in the Docker community.

Can't switch to Windows containers on Windows 10 Pro

Issue Type: Cannot switch to Windows containers
OS Version/build: Windows 10 Enterprise, Version 1803, Build 17134.1365, x64
App version: Docker Desktop for Windows, Community, 2.3.0.3 (45519)
Engine: 19.03.8

I am unable to switch to Windows containers. When attempting to switch, about a minute passes, then I get the error below. I’ve already attempted uninstalling & reinstalling Docker Desktop. I also confirmed that the Windows features for “Containers” and “Hyper-V” are enabled. I’ve also tried the PowerShell script here, but same issue.

https://github.com/tfenster/dockeraccesshelper

I do not have admin privileges on my machine, and cannot run Docker Desktop as admin.

I’ve attached the crash report. Any help would be appreciated, thank you!

diagnostics.log (43.8 KB)
log.txt (247.7 KB)

Docker.Core.HttpBadResponseException:
Unhandled exception: Time out has expired and the operation has not been completed.
   at Docker.Core.Logging.ClientExceptionInterceptor.<InterceptResponseAsync>d__0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\Logging\ClientExceptionInterceptor.cs:line 17
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Core.Logging.LoggingMessageHandler.<SendAsync>d__4.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\Logging\LoggingMessageHandler.cs:line 37
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Core.BackendAPI.BackendAPIClient.<StartWindowsContainersAsync>d__6.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\BackendAPI\BackendAPIClient.cs:line 53
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Engines.WindowsContainersEngine.<DoStartAsync>d__12.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WindowsContainersEngine.cs:line 50
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
Original stacktrace:
   at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
   at Docker.Backend.Processes.WindowsDockerDaemon.TryToStartService(Settings settings, String args, Dictionary`2 env) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Backend\Processes\WindowsDockerDaemon.cs:line 211
   at Docker.Backend.HttpAPI.WindowsContainersController.Start(WindowsContainerStartRequest request) in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 42
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
  1. Could you please check your Hyper VM and ensure your docker is running.

  2. Below error from your log.txt, is it preventing to run vpnkit.exe?

[11:19:32.949][VpnKit ][Error ] vpnkit.exe: Starting to watch : EINVAL
[11:19:32.949][VpnKit ][Error ] vpnkit.exe: Failed to watch hosts file : invalid argument

Thanks SS, Docker Desktop is running, I just can’t switch to Windows containers. I checked my Windows Services, and “Hyper-V Virtual Machine Management” and “Docker Desktop Service” are both Running.

Re: vpnkit, the vpnkit.exe exists, but I see “hosts” argument is empty in log.txt. Not sure how “hosts” gets passed in by Docker?

Starting C:\Program Files\Docker\Docker\resources\vpnkit.exe --ethernet \\.\pipe\dockerVpnkit --hosts "" --http "C:\Users\kptucker\AppData\Roaming\Docker\http_proxy.json" --gateway-forwards "C:\Users\kptucker\AppData\Roaming\Docker\gateway_forwards.json" --diagnostics \\.\pipe\dockerVpnKitDiagnostics --host-names host.docker.internal,docker.for.win.host.internal,docker.for.win.localhost --gateway-names gateway.docker.internal,docker.for.win.gateway.internal,docker.for.win.http.internal --listen-backlog 32 --gateway-ip 192.168.65.1 --host-ip 192.168.65.2 --lowest-ip 192.168.65.3 --highest-ip 192.168.65.14

I too had this error when attempting to ‘Switch to Windows containers…’ on my Windows 10 Version 2004 (OS Build 19041.388) system. In my case it was Carbon Black anti-virus software. Got IT to disable it and was immediately able to switch to Windows containers. The comment in this issue posting on GitHub is what tipped me off: