FIX: Hyper-V and containers features are not enabled error in Windows

Tashreef Shareef
by Tashreef Shareef
Author
Loading Comments
Download PDF
Affiliate Disclosure

Docker Desktop is a software application for Windows machines that allows the developers to build production-ready container applications easily. However, some users have reported Hyper-V and container features are not enabled error while installing Docker Desktop in the computer. You can find similar issues in the Reddit community as well.

Does anyone have any ideas how to enable Hyper-v and containers on Windows 10 Pro 64bit with compatible hardware (according to msinfo32) and all requirements met ie BIOS virtualisation enabled, >4GB RAM and so on. Despite all this none of the commands in powershell or cmd succeed.They complain that one or more parent features must be enabled. There is no error when enabling via Windows features but after the restart Hyper-v regresses to disabled. 

If you are troubled by this error, here are a couple of troubleshooting tips to help you fix Hyper-v and containers features are not enabled error in Windows computer.

How to fix Hyper-v and containers features are not enabled

1. Enable Virtualization in BIOS for Hyper-V

  1. If you haven’t already, you need to enable Hyper-V in BIOS before Docker can install and enable containers features.
  2. Shutdown your computer if it is on.
  3. Restart the computer and press F2 to open the BIOS setup. The function key can be different depending on the motherboard maker.
  4. Use the right-arrow key to navigate to the Advanced tab.
  5. Choose the Virtualization Technology and hit enter.
  6. Select Enable and hit Enter again.
  7. Save the changes (F10) and exit.
  8. Try to run Docker and check if the Hyper-v and containers features are not enabled error is resolved.

How to use Windows Sandbox and VirtualBox VMs simultaneously


2. Enable Hyper-V in Windows 10

  1. If the issue persists, you may have to manually enable Hyper-V virtualization feature in Windows 10.
  2. Press Windows Key + R to open Run.
  3. Type control and click OK.
  4. In the Control Panel, go to Programs > Programs and Features.
  5. From the left pane, click on Turn Windows Features on or off.
    Hyper-v and containers features are not enabled
  6. Select Hyper-V in the Windows Features window.
  7. Click OK to apply the changes.
  8. Once the installation is completed, you are prompted to restart the computer.

Enable Hyper-V with CMD and DISM

  1. Alternatively, you can also use DISM and PowerShell command to enable Hyper-V.
  2. Right-click on Start and select PowerShell (admin).Hyper-v and containers features are not enabled
  3. In the PowerShell window, type the following command and hit enter.
    DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
  4. Close the PowerShell window and launch Docker. Check for any improvements.

3. Try to Remove and Reinstall Hyper-V

  1. If you have already installed Hyper-V, it is possible that the installation may be corrupt resulting in Hyper-v and containers features are not enabled error. Try to remove and install Hyper-V manually to see if that helps.
  2. Right-click on Start and select Windows PowerShell (Admin).
    Hyper-v and containers features are not enabled
  3. In the PowerShell window type the following command and hit enter one by one.
    Disable-WindowsOptionalFeature -FeatureName microsoft-hyper-v -online restart-computer
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All restart-computer
    Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
  4. Check for any improvements.
  5. If the issue persists, try to run the following command in the PowerShell and check if it helps.
    MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof

RELATED STORIES YOU MAY LIKE:

Was this page helpful?
Thanks for letting us know!
Get the most from your tech with our daily tips
Tell us why!