for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Unable to start Docker on Windows 10: Cannot enable Hyper-V service

Open sacag opened this issue 6 years ago • 60 comments

Unable to start Docker on Windows 10. Getting the error: "Cannot enable Hyper-V service". This settings in Win-10 - features is ON. log.txt Please recommend.

Diagnostic id: 90B3DB52-FDE9-4770-AF95-0F87C69FE58D/20200517174003

sacag avatar May 17 '20 17:05 sacag

edit: deleted. Was referencing an unrelated issue.

antoineco avatar May 18 '20 08:05 antoineco

@antoineco - I have Hyper-V enabled and I see the docker service running as well, but when I start the Docker desktop, that's when I see the error i mentioned above

sacag avatar May 18 '20 14:05 sacag

Same issue for me. I have enabled Hyper-V and virtualization in BIOS. I'm getting that same error message when launching "Docker Desktop".

danipeon avatar May 18 '20 17:05 danipeon

@sacag OK, let me remove the ref then.

antoineco avatar May 18 '20 17:05 antoineco

Issue solved after restarting Windows. After installation, Docker asks for logout, but not for complete restart. After complete restart once installation is finished, the issue has disappeared.

danipeon avatar May 18 '20 17:05 danipeon

@danipeon - that didn't work for me. Tried multiple times.

sacag avatar May 18 '20 18:05 sacag

@sacag , what I did was to uninstall Docker Desktop, then install the Edge version (instead of the Stable one), running it "as administrator" (just in case), and after installation was finished, since it doesn't ask for logout, I restarted the computer. Also, check if you have Virtual Box installed. I've read that there is a problem with co-living Docker and Virtual Box/VMWare due to the Hyper-V. Actually, after installing and being able to use Docker, I cannot use Virtual Box machines anymore:

VMMR0_DO_NEM_INIT_VM failed: VERR_NEM_MISSING_KERNEL_API_2 (VERR_NEM_MISSING_KERNEL_API_2). VT-x is not available (VERR_VMX_NO_VMX).

Give a try to this and let's check if we manage to configure it so they can live together.

danipeon avatar May 19 '20 10:05 danipeon

@danipeon - So, that didn't work either. I followed what you suggested. I do not have Virtualbox installed. I have some pending windows updates and they are failing to install. Not sure if it's related.

sacag avatar May 19 '20 15:05 sacag

i'm using VirtualBox because my Work need that, but i can't uninstall it now... theres any solution?

paulohpf avatar May 19 '20 16:05 paulohpf

@sacag I also had a pending update, finished it, rebooted, still nothing.

morphine00 avatar May 20 '20 23:05 morphine00

Now that you said that you had pending Windows updates, when I performed that reboot, there were pending Windows updates. In my case, they were correct. I assume that you have tried to perform those updates by disabling first the Hyper-V in Windows features. If not, try to disable, restart Windows, and try to apply all the pending updates.

In any case, I've uninstalled Docker Desktop. It cannot live together to VirtualBox and for me it is much more important VirtualBox, where I can use Docker inside.

danipeon avatar May 22 '20 20:05 danipeon

Try enabling SVM (security virtual machine) Mode in the BIOS

starcevpro avatar May 24 '20 08:05 starcevpro

Facing the same issue. Docker Desktop was installed on Windows 10. It worked for couple of days. Was working with a container and the machine went in hibernate mode. When taken out of hibernation, it was not responding, hence force shutdown. After that Docker Desktop never starts, gives "Cannot enable Hyper-V service". Tried uninstall and re-installing. Tried all remedies after doing google search. Tried Edge versions and again installed stable versions. Nothing has resolved the situation. Waiting for help.

nahooshmandlik avatar May 27 '20 16:05 nahooshmandlik

I am facing same issue, I have hyper-V enabled in my windows 10 and restart multiple times even but still getting same message.

ankitasthana-hu avatar Jun 26 '20 22:06 ankitasthana-hu

I've discovered that i can't use Docker with VirtualBox

paulohpf avatar Jun 26 '20 23:06 paulohpf

Yes, exactly, it is not possible to use Docker if you have installed VirtualBox. In my case, all the problems related to the installation of Docker were solved when I realized of that I cannot use VirtualBox at the same time, since I need to use VirtualBox. For that reason, I decided to use VirtualBox and use Docker inside in a Linux virtual machine.

danipeon avatar Jun 27 '20 11:06 danipeon

Using Windows 10 build 2004 using WSL 2, i enable to run both in the same machine... Maybe they fixed something in Hyper-V, i don't know...

paulohpf avatar Jun 27 '20 20:06 paulohpf

Need to enable virtualization in BIOS

magicse7en avatar Jul 01 '20 18:07 magicse7en

Need to enable virtualization in BIOS

This worked

ghost avatar Jul 07 '20 00:07 ghost

I have the same problem. I think this is because I have 2 operating systems

xabiden avatar Jul 11 '20 18:07 xabiden