Reputation: 16851
Why do I keep getting this error. It has been days now googling and trying to find a solution for this issue. I have no clue how to resolve this can someone please help me understand how to fix this ?
docker version:
Version 2.0.0.3 (31259) Channel: stable Build: 8858db3
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V was unable to find a virtual switch with name "DockerNAT".
at New-Switch, <No file>: line 121
at <ScriptBlock>, <No file>: line 411
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\workspaces\stable-18.09.x\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:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92
at Docker.Actions.<>c__DisplayClass19_0.<Start>b__0() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59
Upvotes: 1
Views: 811
Reputation: 23
I had the same issue, here is what worked for me:
After doing these steps the error went away and my docker instance was working again.
Hope this solves your issue. Enjoy!
Upvotes: 0
Reputation: 91
After uninstalling and installing multiple times, despite 'Hyper-V' is enabled, I kept getting this error.
Running the MOFCOMP command and a reboot fixed this problem for me.
Running this command: (Command Prompt as administrator)
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
Then restart.
Upvotes: 0
Reputation: 2854
I also spent days trying to install and get Docker working correctly on Windows. It turned out that the company's antivirus had rules to block the creation of virtual switches. Also, uninstalling Docker left things behind which prevents a fresh install. Here is what I suggest doing:
Upvotes: 1