I am new with docker.
I have downloaded docker desktop 4.3 version and installed when I start it
give error can not enable hyper-v service.
however windows hyper-v and container are enabled in windows features and BIOS also I enabled the hyper-v using powershell to start automatically.
I searched two days but not found solution answer.
Related
ErrorI got an error Docker failed to initialize, Docker Desktop is shutting down.
I uninstalled then restart my computer then I reinstalled again with admin. But couldnt solve this error. I used Windows 10 Home Single Language
How can I solve this error? (I attached screenshot)
Thanks
In windows 10 home, hiperv(hypervisor) to available(but you can also enable it). so you have to use wsl, so follow this guide on how to install docker desktop with wsl.
if you followed the guide, please check,
Windows subsystem for Linux
Virtual Machine Platform
are enabled in Windows features, check this guide if you don't know how to enable them.
I'm in a situation where:
I have no choice of server OS (Windows Server 2016 Build 14393).
And no choice of container OS (I need Linux Containers).
And I don't need Docker EE (Enterprise), CE (Desktop Edition) will do.
The easiest way to get Linux containers without hacky workarounds is to download Docker Community Edition 2.0.0.3 2019-02-15
Link: https://download.docker.com/win/stable/31259/Docker%20for%20Windows%20Installer.exe
Page with all versions: https://docs.docker.com/docker-for-windows/release-notes/
Simply download/copy the file to the Windows Server 2016 machine and run it.
It can also run offline for air gapped systems.
Uncheck the "Use Windows containers" during setup. Unchecked by default.
You will get a message after installing saying that windows so and so is deprecated. Click OK.
Log out and log back in.
If you hadn't installed Hyper-V it'll prompt you to do it automatically. Allow it, let it finish and restart. You're good to go now.
I've tested this by running several Linux containers, it works fine. If I'm missing something do share for the benefit of others. The downside is you cannot update to a later version of Docker.
Update:
Disclaimers:
This can help you avoid the hardware limitations and complexities of using LCOW with Docker-EE for Windows.
It is more recent than the latest official version of LCOW available.
This won't let you run Windows and Linux containers in parallel. You can only run one or the other.
This also won't start docker automatically at startup (not until you login). To start docker without login you'll need to add Docker Desktop Executable to Windows Task Scheduler and configure it to run on startup whether user is logged in or not. You'll have to provide an account for it (ideally a service account, or an account with a permanent password)
I just installed Docker after upgrading my Windows 10 Home x64 to the version 2004 with the OS build 19041.264 (I needed to upgrade because Docker required me to have an OS buld >19018). Now if I want to launch docker I get this error Hardware assisted virtualization and data execution protection must be enabled in the BIOS. I have already read this (it is old) question, but because they let me install docker on my windows 10 home I assume that I can somehow run it without hyper-v, cuz I can't download it.
The Hyper-V role cannot be installed on Windows 10 Home. Hyper-V is used to run Linux kernel on Windows.
https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
The alternative solution is you can use Virtual box instead of Microsoft native Hyper-V. Docker toolbox comes with Virtual box. You can get details installation steps from below link.
https://docs.docker.com/toolbox/toolbox_install_windows/
You will need Windows 10 Pro to run docker. Home edition is not useful for the purpose.
On a physical server with Windows Server 2019 Enterprise, I created Hyper V multiple VMs, both Servers and Win 10 Pro client.
I installed Docker Desktop (for Windows) on one of the Win 10 Pro VM clients.
The client virtual machine name is the Hyper-V Manager. I get an error when I try to start DockerDesktopVM, and the state remains off; any Docker command crashes Docker.
My questions:
Is there a conflict when nesting Hyper-V managers and VMs on the physical box?
How can you execute any docker commands when the DockerDesktopVM is off and cannot be started?
https://www.altaro.com/hyper-v/enable-nested-virtualization/
Q: How Do I Enable Nested Virtualization for Hyper-V Virtual Machines
A: Pass $true for Set-VMProcessor’s “ExposeVirtualizationExtensions” parameter
Set-VMProcessor <VMName> -ExposeVirtualizationExtensions $true
According to Docker FAQ
Docker Desktop is not supported in nested virtualization scenarios. It
might work in some cases and not in others.
https://docs.docker.com/desktop/faqs/general/#can-i-run-docker-desktop-in-nested-virtualization-scenarios
It should work even on AMD, according to MicrosoftDocs/Virtualization-Documentation issue 1276:
"Run Hyper-V in a Virtual Machine with Nested Virtualization"
Prerequisites
...
AMD EPYC/Ryzen processor or later
The Hyper-V host must be Windows Server 2022/Windows 11 or greater
VM configuration version 10.0 or greater
And:
What's new in Windows Server 2022
Nested virtualization is a feature that allows you to run Hyper-V inside of a Hyper-V virtual machine (VM).
Windows Server 2022 brings support for nested virtualization using AMD processors, giving more choices of hardware for your environments.
More information can be found at the nested virtualization documentation.
I have windows 10 home edition. I checked my hyper v capabilites of the machine.all four of it says ÝES. Should I get the docker for windows or the toolbox. I am confused.
See official guide: just follow them, don't try to make any hacker as I think this maybe waste effort to do that. For you, choose docker toolbox please.
README FIRST for Docker Toolbox and Docker Machine users: Docker Desktop for Windows requires Microsoft Hyper-V to run. The Docker Desktop for Windows installer enables Hyper-V for you, if needed, and restarts your machine. After Hyper-V is enabled, VirtualBox no longer works, but any VirtualBox VM images remain. VirtualBox VMs created with docker-machine (including the default one typically created during Toolbox install) no longer start. These VMs cannot be used side-by-side with Docker Desktop for Windows. However, you can still use docker-machine to manage remote VMs.
System Requirements:
Windows 10 64bit: Pro, Enterprise or Education (Build 15063 or later).
Virtualization is enabled in BIOS. Typically, virtualization is enabled by default. This is different from having Hyper-V enabled. For more detail see Virtualization must be enabled in Troubleshooting.
CPU SLAT-capable feature.
At least 4GB of RAM.
Note: If your system does not meet the requirements to run Docker Desktop for Windows, you can install Docker Toolbox, which uses Oracle Virtual Box instead of Hyper-V.
You won’t be able to use Docker Desktop for Windows Home edition. Docker Desktop supports professional edition not the home edition. The only option you have is Docker Toolbox.
Enter to your BIOS, and try to enable Virtualization Technology(Vtx) or AMD-V