Fix: Hyper-V and Containers Features not Enabled in Windows
You might need to reinstall Hyper-V to fix this
3 min. read
Updated on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Key notes
- If you are dealing with the Hyper-V and containers Windows features must be enabled, it might be because Hyper-V is disabled.
- You can fix this issue quickly by enabling virtualization in BIOS settings.
Docker Desktop is an application for Windows machines that allows developers to build production-ready container applications. However, some users have reported Hyper-V and container Windows features must be enabled errors while installing Docker Desktop.
If you are troubled by this error, here are a couple of troubleshooting tips to help you fix it quickly.
How do I fix the Hyper-V and containers must be enabled error?
1. Enable Virtualization in BIOS for Hyper-V
- If you haven’t already, you need to enable Hyper-V in BIOS before Docker can install and enable container features.
- Shut down your computer if it is on.
- Restart the computer and press F2 to open the BIOS setup. The function key can be different depending on the motherboard maker.
- Use the right-arrow key to navigate to the Advanced tab.
- Choose the Virtualization Technology and hit Enter.
- Select Enable and hit Enter again.
- Press F10 to save the changes and exit.
- Try to run Docker and check if the Hyper-v and containers features are not enabled error is resolved.
Enabling Virtualization support also helps with the Unexpected WSL error in Docker Desktop.
2. Enable Hyper-V
2.1. Use Control Panel
- If the issue persists, you may have to manually enable Hyper-V virtualization feature in Windows 10.
- Press Windows key + R to open Run.
- Type control and click OK.
- In the Control Panel, go to Programs and choose Programs and Features in the next page.
- From the left pane, click on Turn Windows Features on or off.
- Select Hyper-V in the Windows Features window.
- Click OK to apply the changes.
- Once the installation is completed, you are prompted to restart the computer.
2.2. Use PowerShell
- Alternatively, you can also use DISM and PowerShell command to enable Hyper-V.
- Right-click on Start and select Windows PowerShell (Admin) to open the window below.
- In the PowerShell window, type the following command and hit Enter.
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
- Close the PowerShell window and launch Docker. Check for any improvements.
3. Try to Remove and Reinstall Hyper-V
- 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.
- Right-click on Start and select Windows PowerShell (Admin).
- In the PowerShell window type the following command and hit Enter after each:
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
- Check for any improvements.
- If the issue persists, try to run the following command in the PowerShell and check if it helps:
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
We have reached the end of this guide on fixing the Hyper-V and containers Windows features must be enabled issue. Provided you follow the steps in this guide, the error should disappear for good.
If the Virtual Machine Management service is also missing on your PC, our comprehensive guide can help you restore it.
Do let us know the solution that helped you fix this in the comments below.
User forum
0 messages