- FIX: Hyper-V and containers features are not enabled error in Windows
- How to fix Hyper-v and containers features are not enabled
- 1. Enable Virtualization in BIOS for Hyper-V
- 2. Enable Hyper-V in Windows 10
- 3. Try to Remove and Reinstall Hyper-V
- Unable to start Docker on Windows 10: Cannot enable Hyper-V service #6772
- Comments
- sacag commented May 17, 2020 •
- antoineco commented May 18, 2020 •
- sacag commented May 18, 2020
- danipeon commented May 18, 2020
- antoineco commented May 18, 2020
- danipeon commented May 18, 2020
- sacag commented May 18, 2020
- danipeon commented May 19, 2020
- sacag commented May 19, 2020
- paulohpf commented May 19, 2020
- morphine00 commented May 20, 2020
- danipeon commented May 22, 2020
- starcevpro commented May 24, 2020 •
- nahooshmandlik commented May 27, 2020
- ankitasthana-hu commented Jun 26, 2020
- paulohpf commented Jun 26, 2020
- danipeon commented Jun 27, 2020
- paulohpf commented Jun 27, 2020
- Cannot enable Hyper-V and Containers Feature #1631
- Comments
- ctjoumas commented Jan 29, 2018
- Expected behavior
- Actual behavior
- Information
- Steps to reproduce the behavior
- 10Dev commented Feb 2, 2018
- ctjoumas commented Feb 2, 2018
- ViniciusAtaide commented Feb 14, 2018
- ctjoumas commented Feb 16, 2018
- GunayAnach commented Mar 7, 2018
- Cannot enable Hyper-V service #6714
- Comments
- foxlance commented May 14, 2020
- Expected behavior
- Actual behavior
- Information
- Steps to reproduce the behavior
- Other things to note
- Richard-Barrett commented May 14, 2020
- Windows
- foxlance commented May 15, 2020
- docker-desktop-robot commented Jul 16, 2020
FIX: Hyper-V and containers features are not enabled error in Windows
- Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
- Click Start Scan to find Windows issues that could be causing PC problems.
- Click Repair All to fix issues affecting your computer’s security and performance
- Restoro has been downloaded by 0 readers this month.
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
- If you haven’t already, you need to enable Hyper-V in BIOS before Docker can install and enable containers features.
- Shutdown 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.
- Save the changes (F10) and exit.
- Try to run Docker and check if the Hyper-v and containers features are not enabled error is resolved.
2. Enable Hyper-V in Windows 10
- 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 > Programs and Features.
- 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.
Enable Hyper-V with CMD and DISM
- Alternatively, you can also use DISM and PowerShell command to enable Hyper-V.
- Right-click on Start and select PowerShell (admin).
- 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 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 - 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
RELATED STORIES YOU MAY LIKE:
Unable to start Docker on Windows 10: Cannot enable Hyper-V service #6772
Comments
sacag commented May 17, 2020 •
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
The text was updated successfully, but these errors were encountered:
antoineco commented May 18, 2020 •
edit: deleted. Was referencing an unrelated issue.
sacag commented May 18, 2020
@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
danipeon commented May 18, 2020
Same issue for me. I have enabled Hyper-V and virtualization in BIOS. I’m getting that same error message when launching «Docker Desktop».
antoineco commented May 18, 2020
@sacag OK, let me remove the ref then.
danipeon commented May 18, 2020
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.
sacag commented May 18, 2020
@danipeon — that didn’t work for me. Tried multiple times.
danipeon commented May 19, 2020
@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.
sacag commented May 19, 2020
@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.
paulohpf commented May 19, 2020
i’m using VirtualBox because my Work need that, but i can’t uninstall it now. theres any solution?
morphine00 commented May 20, 2020
@sacag I also had a pending update, finished it, rebooted, still nothing.
danipeon commented May 22, 2020
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.
starcevpro commented May 24, 2020 •
Try enabling SVM (security virtual machine) Mode in the BIOS
nahooshmandlik commented May 27, 2020
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.
ankitasthana-hu commented Jun 26, 2020
I am facing same issue, I have hyper-V enabled in my windows 10 and restart multiple times even but still getting same message.
paulohpf commented Jun 26, 2020
I’ve discovered that i can’t use Docker with VirtualBox
danipeon commented Jun 27, 2020
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.
paulohpf commented Jun 27, 2020
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.
Cannot enable Hyper-V and Containers Feature #1631
Comments
ctjoumas commented Jan 29, 2018
Expected behavior
Docker for Windows has all services started, starts up, and runs properly
Actual behavior
Cannot enable Docker services after install
Information
- I tried installing Docker for Windows already and was not able to get it to work. I’ve uninstalled and re-installed, and things seem to maybe be a bit different as there is no reboot during installation, but I’m not sure if that happened the first time I installed or not.
- My user is in the Administrators group
- Virtualization is enabled
- Running Windows 10 Enterprise, version 1709, OS Build 16299.125
- After running through steps below, in the turn features on/off window, «Containers» remains unchecked and under Hyper-V, «Hyper-V Platform» is checked, but «Hyper-V Management Tools» is unchecked. As stated in step 7 below, I can enable these manually here and it will do something and ask me to reboot, but the unchecked items I listed here remain unchecked upon my computer restarting
Steps to reproduce the behavior
- Install docker for windows (Stable) — 17.12.0-ce-win47 (it unpacks files and installs)
- Installation Succeeded message appears; click Close button
- Start Docker («Docker is starting. » message appears in the task bar)
- Message pops up stating «Hyper-V and Containers features are not enabled. Do you want to enable them for Docker to be able to work properly? Your computer will restart automatically.» I click OK.
- Click OK
- After 30 seconds or so, a dialog pops up stating «An error occurred. Docker failed to enable Hyper-V and Containers. Please enable those features manually for Docker to be able to work properly. To enable hyperV, follow the instructions here: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v»
- I’ve tried the PowerShell option, the DISM option, and the turn features on/off option. Each option does «something» and then asks to reboot and when i do, docker is attempted to be started when windows returns and we go back to step 4 above.
The text was updated successfully, but these errors were encountered:
10Dev commented Feb 2, 2018
Just passing by, but off the top of my head, you don’t have a Docker technical issue, just a poorly worded error message that is pointing you in the wrong direction and should be fixed.
You have a Hyper-V not working issue which could be CPU missing SLAT, Group Policy prevention, BIOS setting, corrupt Windows Install etc.
ctjoumas commented Feb 2, 2018
Yea, I think you’re exactly right. That’s the conclusion I’ve come to. I believe it may be a group policy issue but so far nothing I’ve tried has fixed it. I may need to bite the bullet and re-install my OS. Thanks.
ViniciusAtaide commented Feb 14, 2018
Just got by this issue and resolved by myself, the Hyper-V manager in windows showed that MobyLinuxVM was installed but wasn’t on, so I started manually the VM and then Docker was started sucessfully, hope I could help.
ctjoumas commented Feb 16, 2018
Glad you were able to resolve it! My problem is Hyper-V isn’t getting installed. so as 10Dev mentioned, it’s not a Docker issue, but a Hyper-V issue. I am out of ideas though 🙂
GunayAnach commented Mar 7, 2018
Had exactly same issue with Windows 10 today. Seems like an update KB4074588 didn’t get installed and was preventing container and Hyper-V Features to be installed as well.
Try to runs this in admin CMD
SC config trustedinstaller start=auto
Of course I assume you have already tried the following:
Cannot enable Hyper-V service #6714
Comments
foxlance commented May 14, 2020
|
Expected behavior
I can start Docker Desktop
Actual behavior
Docker Desktop does not start. I get the error:
An error occurred
Cannot enable Hyper-V service
Information
- Windows Version: Win10 Pro. 1903 (OS Build 18362.778)
- Docker Desktop Version: (Stable) 2.3.0.2 (45183)
- Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No.
Steps to reproduce the behavior
- Make sure Hyper-V and Containers is ticked on windows Features
- Make sure Virtualization is enabled under CPU.
- Re-start PC
- Start Docker Desktop. Will attempt to start but fail with the aforementioned error.
Other things to note
- I have Vagrant and VirtualBox installed. They are not running as a service, nor are they active. I’m not attempting to run these alongside Docker Desktop. I’m simply trying to test Docker Desktop to see if I can finally make the switch. I can use vagrant just fine, so I know Hyper-V and virtualization is enabled and working.
When making the diagnostics, the log file shows the following which may be of interest:
The text was updated successfully, but these errors were encountered:
Richard-Barrett commented May 14, 2020
Windows
Here is what worked for me:
If you want to do it on Windows I would do the following:
- Uninstall Everything Related to Docker-Desktop in Control Panel and disable Hyper-V
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v - If you are using Chocolatey you can uninstall all of that there too with choco uninstall package and disable Hyper-V https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
- Restart your Machine and Enter BIOS Menu and Make sure you have Virtualization and/or Hyperthreading Enabled.
Use this link to see how to get into BIOS: https://support.lenovo.com/us/en/solutions/ht500006
You may need to reset your BIOS to default (Note not all Machines Support Virtualization)
4. Allow for normal boot to occur
5. Enable Hyper-V for Windows 10
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
6. Run through the following in an elevated command prompt and allowing for administrative access by right-clicking on command prompt:
- Restart Your Computer One More Time
- Boot up
- You can go to Docker-Desktop or you can install it with Chocolatey
If you want to install it via website, I assume you know where to go. Get the Stable Version.
10 (Option A). Install as normal via https://www.docker.com/products/docker-desktop
10 (Option B). Use Chocolatey:
Open up powershell in elevated admin console and install chocolatey
Then after you install it run:
Whatever you decide, you need to make sure
- Your System Supports Virtualization
- You have that enabled in System BIOS
- Makes sure you have downloaded the WSL 2 background: https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel
Hope this helps, I too have had so many problems with Docker-Desktop as of late.
foxlance commented May 15, 2020
@Richard-Barrett Thanks a lot for the swift response! I gave it a couple more attempts yesterday, and tried uninstalling Hyper-V, and Docker-Desktop, to no avail. In fact I ended up installing the Edge version cause I was running out of ideas. Everything on your notes are steps I’ve already given a try. All except one:
After that command and a restart, Docker Desktop is now running!
The bad news though is that vagrant doesn’t work with that feature turned on, so I have to turn it off and restart if I want to use vagrant. A minor annoyance, but works. Thanks again!
docker-desktop-robot commented Jul 16, 2020
Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.