How to fix “cannot enable hyper-v service” on Dockers once for all. 🐳

Hey everyone, today I am going to show you how to solve the “cannot enable hyper-v service” problem once for all when installing docker for the first time or after disabling hyper-v.

There is a error while enabling hyper-v on windows features directly, that even after restarting your computer docker does not turn on and displays the message “cannot enable hyper-v service” even with hyper-v enabled. To fix this error you gotta make sure that hyper-v is enable on windows feature of course (also make sure that the options containers is selected !!! )

Then after that open cmd or powershell as administrator and type the following commands.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

bcdedit /set hypervisorlaunchtype auto

They all do pretty much the same thing but it is always good to test them all just to make sure, the most important here was the last command, this was the one that fixed my the issue permanently. After all that, restart your computer and tah dah you can use your dockers 🙂

It is also very important to enable virtualization on your bios you can use this video to guide you through that, note that each motherboard my have a slightly different way to enable it.

Thta is all for today everyone, as always have a wonderfull day 🐳🐳🐳

Leave a Reply :)