Open xolider opened 7 months ago
WSL2 uses the Hyper-V Hypervisor as a mandatory architecture requirement. A side effect of this is that because Hyper-V is a Type 1 Hypervisor, Windows itself ends up running in a VM as well as WSL 2.
So the checkbox you mention is just turning on some management features and the ability to create your own additional VMs
WSL2 uses the Hyper-V Hypervisor as a mandatory architecture requirement. A side effect of this is that because Hyper-V is a Type 1 Hypervisor, Windows itself ends up running in a VM as well as WSL 2.
So the checkbox you mention is just turning on some management features and the ability to create your own additional VMs
WSL did use Hyper-V hypervisor. This is not true anymore since the Linux kernel used by WSL was integrated directly into Windows. As a proof, I am running Ubuntu into WSL with all Hyper-V features disabled as well as the Docker Engine
But you are simply not correct. If you scroll down the list you will notice that "Windows Hypervisor Platform" is on. That is the core of Hyper-V that Microsoft is propagating to standardize on all Windows Platforms. As soon as you install WSL 2, you are running a minimum of 2 VMs - One for a custom Linux kernel and the other for your Windows OS. Nobody notices that their Windows is now running in a VM because it runs as an "Enlightened Child Partition" and the special Linux kernel is also full of code to run "Enlightened" - so all the Hyper-V checkbox gets you is the ability to run plain old "Unenlightened" VMs which is why the Docker that runs a VM seems so much slower than the WSL 2 version. Since this is all Developer stuff having the ability to add a Hyper-V VM when you want with no extra footprint is useful to have enabled or at the worst, harmless. You are already running your Windows in a VM which is the big hit if you are going to see any impact!
But you are simply not correct. If you scroll down the list you will notice that "Windows Hypervisor Platform" is on. That is the core of Hyper-V that Microsoft is propagating to standardize on all Windows Platforms. As soon as you install WSL 2, you are running a minimum of 2 VMs - One for a custom Linux kernel and the other for your Windows OS. Nobody notices that their Windows is now running in a VM because it runs as an "Enlightened Child Partition" and the special Linux kernel is also full of code to run "Enlightened" - so all the Hyper-V checkbox gets you is the ability to run plain old "Unenlightened" VMs which is why the Docker that runs a VM seems so much slower than the WSL 2 version. Since this is all Developer stuff having the ability to add a Hyper-V VM when you want with no extra footprint is useful to have enabled or at the worst, harmless. You are already running your Windows in a VM which is the big hit if you are going to see any impact!
I agree your point. But my original question is about the full Hyper-V feature (and not WHP). Hyper-V management features are disabled because I don't need it, but the Docker upgrader does enable it whereas it is not needed when Docker Desktop is running over WSL2. For you to see which features I am talking about, please check the following picture
OK so that was my original point that your description was confusing because it implied you didn't want the Hyper-V infrastructure which is impossible.
With the notes we have added here it adds up to a better description but with the infrastructure changes that Microsoft has made, I don't think you will save much disk space with Hyper-V unchecked and since you are for sure running Hyper-V under the hood, unchecking also won't let you run other VMs
Also, because Docker is being updated and still has the option to run in a VM it isn't really a bug perhaps to default Hyper-V to ON. Also if you want to run Windows Containers and Linux Containers at the same time, Docker will install BOTH to a VM and WSL 2!
+1, same problem. I'm using WSL2 and don't need Hyper-V management and Windows Container features.
Description
Hello, When Docker Desktop is already installed and running through WSL 2, and when we update Docker Desktop to a newer version, the update installer enables Hyper-V without asking for it.
Reproduce
Expected behavior
If Docker Desktop is configured to run over WSL, it shouldn't enable Hyper-V while updating
docker version
docker info
Diagnostics ID
BC38B957-96E4-46C1-9297-6B66550FE909/20231206185701
Additional Info
No response