Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker fails to start with Containers feature is not enabled #1982

Closed
3 tasks done
leandro-fernandez opened this issue Apr 27, 2018 · 15 comments
Closed
3 tasks done

Docker fails to start with Containers feature is not enabled #1982

leandro-fernandez opened this issue Apr 27, 2018 · 15 comments

Comments

@leandro-fernandez
Copy link

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have submitted Diagnostics
  • I have included the Diagnostics ID in this Issue
  • Windows Version: Windows 10 Enterprise 64 bit
  • Docker for Windows Version: 18.03.1-ce-win64

Expected behavior

Docker to start sucessfully

Actual behavior

Docker fails to start in windows with the message "Containers Feature is not enabled"

Information

Diagnostic: FD4605D3-9003-4650-8D78-F41C8012DCA8/2018-04-27_14-08-34
Docker fails to start in windows with the message Containers Feature is not enabled. Do you want to enable it for Docker to be able to work properly? Your computer will restart automatically.
If I hit "Ok", I get back a message saying Docker failed to enable Containers. Please enable this feature manually for Docker to be able to work properly.

Steps to reproduce the behavior

  1. Install latest Docker for Windows Community edition
  2. Try to start Docker
@leandro-fernandez
Copy link
Author

Same thing happened with version 18.03.0-ce-win59 2018-03-26

@jasonbivins
Copy link

jasonbivins commented Apr 27, 2018

@leandro-fernandez It looks like Hyper-V didn't get installed correctly either
Try to remove them, then install manually to see if that helps. Make sure you run powershell as an admin

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

@leandro-fernandez
Copy link
Author

Hey, @jasonbivins, I just happened to solve the problem before reading your reply, thanks.
What did the trick for me was just to run MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof in powershell and restarting the Hyper-V Management service.

@ajbazz
Copy link

ajbazz commented May 25, 2018

@leandro-fernandez Your suggestions seems to only work for some specific scenarios.
It did not work on my Windows 10 and this may be the reason:

The command is used to fix the issue of managing Hyper-V 2012 R2 from Win10 remotely. Not for 2008 R2.

Managing Server 2008 R2 Hyper-V through Hyper-V Manager in Windows 10 is not supported:

From this page: https://social.technet.microsoft.com/Forums/lync/en-US/c6e6e8bc-4cc9-4798-b335-93ccac6afcd3/windowsvirtualizationv2mof-in-hyperv-on-server-2008-r2?forum=winserverhyperv

@melban
Copy link

melban commented Jul 31, 2018

How in the world can I debug this? I've run powershell scripts, modified my BIOS settings, set group policy items, and still have this issue. The automatic restart does nothing shows to do a reversal of the windows updates when it asks if its ok to apply updates and restart.

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.
Note: VirtualBox will no longer work.

@aacosta8
Copy link

@melban

Did you resolve this issue?

@nonbob
Copy link

nonbob commented Aug 29, 2018

This hit me when I got Build 17738 on the Slow ring. It tried the remove/reinstall suggestion above (and some other suggestions from other threads) but it (they) didn't help.

It appears to have been resolved (for me, anyway) with the later Docker update - 18.06.1-ce-win73 (19507).

@jbarea
Copy link

jbarea commented Sep 5, 2018

Anyone got it sorted?. Just stumbled upon this problem when installing it on my desktop computer. Im using windows 10 pro and the latest docker.

@MythicManiac
Copy link

I've had this problem every now and then when swapping between multiple users in Windows. I'm not sure what exactly triggers or fixes it, but usually after I've done some combination of: restarting/quitting docker, restarting/quitting the docker service, restarting/starting/stopping the Hyper-V virtual machine, and swapping users for long enough, it starts working again

@MythicManiac
Copy link

MythicManiac commented Sep 15, 2018

Just now the last step that I took to fix this was:

  • Have Docker VM not running
  • Stop the Docker service

Once launching docker, it prompted for starting the service (which I did), and then it managed to successfully start. Previous to this I had employed various combinations of restarting/stopping/starting everything Docker related as described above in the previous comment.

@Boran
Copy link

Boran commented Nov 2, 2018

Installed "Docker version 18.06.1-ce, build e68fc7a" on Windows 10.
VirtualBox is already installed and I want to keep that, not use Hyper-V.

As noted by @melban above, the message pops up:
Hyper-V and Containers features are not enabled.
Do you want to enable them for Docker to be able to work properly? => "Cancel"
Then docker does not start.
Also tried:
Disable-WindowsOptionalFeature -FeatureName microsoft-hyper-v -online
And also tried to stop the "Docker for windows service", in that case starting docker for windows seems to do nothing.

When I do "docker run" even as administrator, gives "open //./pipe/docker_engine: The system cannot find the file specified".

Is it no longer possible to use Docker on Windows with virtualbox?

@colonelchlorine
Copy link

Followed these instructions, rebooted and it worked:
https://success.docker.com/article/manually-enable-docker-for-windows-prerequisites

@sshushliapin
Copy link

Tried all the above. Still having this issue on win1909 (and 1903). Docker version 19.03.5, build 633a0ea.

image

@M0025
Copy link

M0025 commented Jun 2, 2020

@leandro-fernandez It looks like Hyper-V didn't get installed correctly either
Try to remove them, then install manually to see if that helps. Make sure you run powershell as an admin

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

Thank you very much!!
I've been trapped by this Trouble for daylong, thankyou again!

@docker-robott
Copy link
Collaborator

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

@docker docker locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests