user1116536
user1116536

Reputation: 375

Can't start docker on windows

I continue to get the following error when trying to start docker on Windows 10 pro. my HyperV is turned on and running: Version 18.04.0-ce-win62 (17151) Channel: edge e0a85f6

Any help would be appreciated!

Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'C001715587' because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running.
at New-Switch, <No file>: line 117
at <ScriptBlock>, <No file>: line 394
   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 75
   at Docker.Actions.<>c__DisplayClass15_0.<Start>b__0() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 59
   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

Upvotes: 12

Views: 20962

Answers (6)

Midnight-Commander
Midnight-Commander

Reputation: 11

If You, like me, already have an installed wsl2 distro on Your system (at the time You install Docker Desktop) and all the answers above did not help, than look if Your distro is actually running by hitting the command wsl -l -v

wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

If so, then shutdown Your wsl instance by running wsl -t Ubuntu-20.04 this fixed the issue on my system. Docker Desktop window came immediately up after the wsl instance was down.

I think the problem is that I already have a docker installed in this wsl instance.

Upvotes: 1

Sanket Mehta
Sanket Mehta

Reputation: 622

I tried to run it from C:\Program Files\Docker\Docker\Docker Desktop.exe And it worked.

Also, one more thing I added is I kept the Cisco AnyConnect VPN service running (although none of the VPNs were connected). I know this point sounds weird but I thought to share it.

Upvotes: 1

J.D
J.D

Reputation: 452

You may need to fix your "Control Flow Guard" settings for vmcompute.

(Be aware that CFG is an exploit-protection mechanism, so pay attention when changing it and understand why it exists.)

  1. Open Windows Security

  2. Open App & Browser control

  3. Click Exploit protection settings

  4. Switch to Program settings tab

  5. Locate C:\WINDOWS\System32\vmcompute.exe in the list and expand it

  6. Click Edit

  7. Scroll down to Control flow guard (CFG) and uncheck Override system settings

  8. Start vmcompute from powershell net start vmcompute (or alternately start the Hyper-V Host Compute Service from the system Services app)

  9. Restart PC

  10. Open Hyper-V as Administrator

  11. Connect to Server, Local computer, OK

The above worked for me when I couldn't run docker, then I realized I couldn't connect to my local machine on hyper-v. This is what finally worked.

Upvotes: 23

Samuurai
Samuurai

Reputation: 395

The fix for me was to enable virtualisation in my bios. It'll be in Advanced > CPU Configuration > SVM - make sure it's enabled

Upvotes: 0

Tejashree
Tejashree

Reputation: 810

If you facing

Unable to stop Hyper-V VM: Service 'Hyper-V Host Compute Service (vmcompute)' cannot be started due to the following error: Cannot start service vmcompute on computer '.'.

this error then follow the steps:

  1. Open "Window Security"
  2. Open "App & Browser control"
  3. Click "Exploit protection settings" at the bottom
  4. Switch to "Program settings" tab
  5. Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it
  6. Click "Edit"
  7. Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"
  8. Start vmcompute from powershell "net start vmcompute"

Upvotes: 0

Tejashree
Tejashree

Reputation: 810

Try this. It's sorting the problem of many people.

cd "C:\Program Files\Docker\Docker" 
./DockerCli.exe -SwitchDaemon

Upvotes: 5

Related Questions