Well, I thought this was the case with WSL, but that WSL2 changed this, such that it's really just a full-blown VM now. Are you saying that you're still using WSL 1, or have I misunderstood the nature of WSL2?
But the deeper integration and lighter underlying OS for WSL2 is better, especially for Docker dev container usage with VSCode.
Start VM in background at boot time and ssh in milliseconds when necessary.
> WSL doesn't run the full slew of linux processes
I don't know what linux processes are you talking about, but minimal Linux ram consumption is something like 50 MB, that's hardly noticeable.
> uses the same memory space
RAM ballooning is available in VirtualBox or Vmware for years.
> CPU utilisation is much lower than a VM
I don't think that's true. There's no inherent CPU utilization in Linux (and WSL2 is VM).
> You don't need to contend with all the fiddly configuration parameters and config of VM software, and it integrates into the Windows environment by default, again without fiddly configuration.
And that's probably the main reason why WSL is so popular. Installing VM software, creating virtual machine with proper configuration, installing guest tools, configuring it to start/stop at host OS boot/shutdown, configuring shortcuts for ssh is out of reach for most developers and power users. WSL just simplified that process. Probably could be implemented with some wrappers around VBoxManage years ago, but nobody understood the problem.
1. Isn't WSL2 now actually a VM too? My biggest deal breaker with WSL2 is that it moves my main Windows into now a parent VM over the Type 1 hypervisor; making everything else in my main Windows just that little bit wonkier. Worse, this information isn't as readily easily grokkable as I feel it should be. I.e. if somebody isn't comfortable installing a clean, separate VM in Virtualbox, they may be even less aware of consequences of moving their main Windows installation into a VM now.
2.Re fiddliness: Installing Ubuntu into VIrtualbox has always seemed trivially easy; and there's any number of downloadable pre-built images from safe sources. Whereas figuring out how to access Windows filesystem from WSL2 and vice versa; let alone installing GUI tools - always seemed completely opaque to me with any number of half-built, quarter-supported guides and solutions out there. And I never seem to know or guess correctly what subset of Linux functionality will or will not work, normally or differently.
https://techcommunity.microsoft.com/t5/virtualization/hyper-...
Are you sure about this? It seems unlikely that NT would change significantly depending on whether or not it is hosting a WSL2 guest. I've never noticed anything different about my Windows since using WSL2.
> Windows filesystem from WSL2 and vice versa
/mnt/C/
\\wsl.localhost\Ubuntu
But yes, everything I've read and experienced indicates that:
1. WSL2 IS a VM and it necessitates installation of certain portions of Hyper-V, which as Type-1 hypervisor, means your primary windows partition is no longer bare-metal but rather now a parent virtual machine.
2. This has impact on running other Type 2 hypervisors such as VirtualBox or VMWare etc; as well as some types of performance-intensive applications and games.
They’re also doing the same for Windows 11 by default now too I believe.
> In addition, if you have Hyper-V enabled, those latency-sensitive, high-precision applications may also have issues running in the host. This is because with virtualization enabled, the host OS also runs on top of the Hyper-V virtualization layer, just as guest operating systems do.
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-w...
1. https://docs.microsoft.com/en-us/windows/wsl/faq
"The newest version of WSL uses Hyper-V architecture to enable its virtualization"
A little bit of detail on impact, but incomplete/generic.
2. https://docs.microsoft.com/en-us/windows-server/administrati...
"Hyper-V features a Type 1 hypervisor-based architecture. "
Has some basic info, worth a read.
> In addition, if you have Hyper-V enabled, those latency-sensitive, high-precision applications may also have issues running in the host. This is because with virtualization enabled, the host OS also runs on top of the Hyper-V virtualization layer, just as guest operating systems do.
I'd say vagrant did something in that area.
Rolling your own implementation with vmware poses the exact same security and compliance risks, but its way more likely to put a spotlight on you.
(I still agree with your overall point though.)
Look, if you want to tune your VM exactly to your liking then use a VM. It will give you a lot more control.
Serious question: how long does it take to spin up a VM on Windows then? Does it take seconds?
(Not disputing your other points.)
WSL1 takes about a second, and I'm pretty sure most of that is the init script that spits out network/update info.
If you're doing sysadmin work or web development, and need to run Windows software as well or are on hardware with better Windows support, it's hard to see why you wouldn't use WSL.
To your point on total control of the emulation, not everybody needs that. If your use case means you need a real Linux OS environment, then sure, WSL isn't for you.