Eric Sjöström Jennerstrand

Litium E-commerce, C#, .NET MAUI, Javascript, React, Azure, Git. .NET, Node and more!
Docker

Cannot Enable Hyper-V Service

Quick Read

  1. Open programs in Windows Settings.
  2. Click program and functions.
  3. Click Activate or deactivate Windows-functions.
  4. Deselect Hyper-V and all child nodes.
  5. Restart computer.
  6. Select Hyper-V and all child nodes.
  7. Restart computer.

The error “An Error Occurred – Cannot Enable Hyper-V Service” is a common error on Windows. And if you are unlucky, like me. This can occur right after installing Docker on windows for the first time (Docker for Windows). Or when you update Docker in some cases. Lucky for you, this can be resolved easily with these 7 simple steps and a few restarts (I know, restarts suck, but just this once)!

An Error Occurred – Cannot Enable Hyper-V Service

Firstly, got to add or remove programs in Windows, and click “Program and functions”, as shown below.

Windows Settings - Apps and functions - Cannot Enable Hyper-V Service


Secondly, at this screen, click Activate or deactivate widows-functions.

Window: Programs and Functions - Cannot Enable Hyper-V Service


If you take a look at the screen below. And look for the Hyper-V section and make sure it’s selected. And now you should make sure all nodes and child nodes is selected, otherwise Hyper-V might not be enabled properly and this last step might not work as expected.

  • If Hyper-V is selected, you should deselect it and all child nodes and restart your computer, go back to the same place and select it again with all child nodes and restart your computer. This should make it work!
  • If Hyper-V is not selected, select it again with all child nodes and restart the computer one last time.
Activate or Deactivate windows-functions - Cannot Enable Hyper-V Service

Conclusion

An Error Occurred – Cannot Enable Hyper-V Service is a common error. But easy to fix in most cases.

  1. Open programs in Windows Settings.
  2. Click program and functions.
  3. Click Activate or deactivate Windows-functions.
  4. Deselect Hyper-V and all child nodes.
  5. Restart computer.
  6. Select Hyper-V and all child nodes.
  7. Restart computer.

If it still dosen’t work, you can try this.

Need some help with your C# coding?

Checkout these simple easy to read articles about foreach loops, for loops and reverse for loops if you want som extra reading:
https://www.jennerstrand.se/foreach-loop-in-c-sharp-simple-use.
https://www.jennerstrand.se/for-loop-in-c-sharp-simple.
https://www.jennerstrand.se/reverse-for-loop-in-c-sharp.

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>