Problem:
When I try to start docker desktop it leaves me this error.
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".
This is the output when I issue docker version command on the terminal.
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
This working without giving any error when in windows containers. But when I change it to Linux containers this happens. I tried a lot to find a solution to this problem. But I was unable to find a solution. Can someone help me to solve this problem? Thank you.
Here is what works for me - open Hyper-V manager and from 'Actions' panel on the right click 'Stop Service' and confirm prompt. Then, Install Docker desktop which will restart your hyper-v and create DockerNat. To check click 'Virtual Switch Manager' from 'Actions' panel and you should see it on the Left.
Here is what worked for me:
After doing these steps the error went away and docker was working again
Hope this solves your issue. Enjoy!
I just ran into this issue today my fix was.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.