12

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
1
  • So did you verify that the Virtual Machine Management service on the computer is running?
    – Ken White
    May 2, 2018 at 2:26

6 Answers 6

23

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.

3
  • Note that the procedure can be started at "Open 'App & browser control'". Also, after this settings change, I was able to bring Docker up. The Hyper-V Host Compute Service should be running before starting Docker. No system restart required. YMMV.
    – ingyhere
    Jun 3, 2019 at 20:28
  • 1
    In my case all the steps were necessary to solve the problem. Thank you! Aug 28, 2019 at 9:00
  • These steps (1-8) also solved below error for me- Unable to stop - The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Service 'Hyper-V Host Compute Service (vmcompute)' cannot be started due to the following error: Cannot start service vmcompute on computer '.'. Jan 6, 2020 at 8:19
5

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

cd "C:\Program Files\Docker\Docker" 
./DockerCli.exe -SwitchDaemon
3
  • 1
    this worked for me after trying @J.D's answer and it not working. Just be warned you might need to do both. Oct 15, 2020 at 9:43
  • 1
    thanks so much Tejashree, after hours of attempting trash solutions, yours finally worked for me. You're awesome
    – gizaom
    Jul 23, 2021 at 16:21
  • 1
    FYI, if you want to use Windows containers this works, but if you are using WSL/Linux containers this will allow you to start Docker but you won't be able to access / run Linux images. Feb 15, 2023 at 15:25
1

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.

1

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.

2
  • works! Open CMD as Administrator, wsl --shutdown and check running the Wsl Application, then Docker will start flawlessly Aug 23, 2022 at 2:18
  • I just finally resolved the issue on my laptop, your answer led me to a solution. My docker-desktop-data distro was always stopped, so I quit Docker, then unregistered both the docker distros (docker-desktop and docker-desktop-data), and then restarted Docker, which worked. Previously, only Windows containers were working, now Linux containers are also working. Command was wsl --unregister docker-desktop-data (in elevated PowerShell) Hope this helps someone.
    – Kirkaiya
    Apr 7, 2023 at 23:05
0

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"
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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