As you all know Docker runs natively on windows 10 OS. This requires Hyper-V to be enabled. I did that and docker is running fine on my win 10. I wanted to run a 64 bit linux VM on my win 10. So I downloaded the oracle virtual box and ubuntu iso and when I opened the oracle vb it was showing only 32-bit guest versions. When I checked the online info, it recommends to turn off the Hyper-V for 64-bit guest versions to appear. I did that and was able to install the 64 bit ubuntu VM on my win 10 but it broke my docker running on win 10.
Is there any way where we can have both docker running and 64 bit virtual machine installed and running on my guest win 10 OS ??
It is not possible to run Hyper-V and Virtualbox at the same time. If Hyper-V is installed on the system then VT-x is not available for VirtualBox.
I have heard of workarounds, that make switching easy, but you have to reboot the system every time.
Ubuntu is supported on Hyper-V. This question on Microsoft forums suggests Hyper-V doesn't really care if you install a 32 bit or 64 bit OS in the virtual machine.
There are a lot of tutorials online on how to create a Hyper-V Linux virtual machine, 5 steps to create Ubuntu Hyper V Image seems as good as any.
Is there any way where we can have both docker running and 64 bit virtual machine installed and running on my guest win 10 OS ??
Double-check with VirtualBox 6.0.x (starting Dec. 2018):
the ten-years old ticket 4032 "[feature-request] Nested Virtualization: VT-in-VT" is still active
there is now an "experimental feature":
2.34. Using Hyper-V with Oracle VM VirtualBox
Oracle VM VirtualBox can be used on a Windows host where Hyper-V is running. This is an experimental feature.
No configuration is required. Oracle VM VirtualBox detects Hyper-V automatically and uses Hyper-V as the virtualization engine for the host system. The CPU icon in the VM window status bar indicates that Hyper-V is being used.
Note
When using this feature, you might experience significant Oracle VM VirtualBox performance degradation on some host systems.
Related
I'm having a Windows VM running Windows 10 Pro and I'm trying to install Docker running with WSL2.
However, the I'm bumping into the error below and I can confirm that Virtual Machine Platform Windows feature is already enabled.
I had this same error and followed these steps for VMWare,
Go to VM Settings >> Hardware >> Processors
In the Virtualization Engine Box, select the checkbox 'virtualize intel vt-x/ept or amd-v/rvi'
Restart your VM
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
What are now Docker cpu requirements for running in Linux, say, Ubuntu and Windows?
Is VT-x/AMD-v is enough or VT-d/AMD-Vi is required too?
Does it require MMU virtualization (Intel's Extended Page Tables (EPT) and Unrestricted Mode, and AMD's Nested Page Tables (NPT) and Rapid Virtualization Indexing (RVI)) like Hyper-V?
Would Xeons with VT-x like 53xx, 54xx run both 32-bit and 64-bit docker images, or just 32-bit or none of them in say, Ubuntu?
May be there is some tool to check for compatibility?
Containers aren't virtual machines. VT-x is not required to run a container. Docker require's certain Linux kernel features. If you have a Linux system on a 3.10+ kernel and a x86-64 CPU, you can run Docker 17.09+.
Windows Server containers require Windows Server build 1709, Windows Server 2016 (Core and with Desktop Experience) and Windows 10 Professional and Enterprise (Anniversary Edition) (all 64bit).
If you want to use Hyper-V Containers, which provide more isolation than Windows Server containers, then you will need to meet Hyper-V's virtualisation requirements.