> it has replaced an always on Linux VM for me (well, it is an always on Linux VM for me).
Here's a question I've been dying to ask someone who admits this is just a VM: What makes it better than running VirtualBox or VMWare Workstation, and having a nice GUI to control the various elements of the virtualization settings?
The major benefits over a fully managed VM from my exp. with it have been
- easy integration with the Windows filesystem (it's automounted into the WSL env)
- Using VS Code to work with files in the WSL2 env. works out of the box (just type `code .` in a WSL windows)
- It's very quick to spin up new WSL2 instances. you can just use `--import` and it'll bring in a tarball to create your new instance. You can even export a Docker image and use that as a WSL instance base filesystem which is handy.
- Docker for Windows works pretty well for most usecases and you get one shared Docker instance across all your WSL setups.
Sure I could do all that with discrete managed VMs but this is easier
Do you know if docker and minikube work inside wsl2? I loaned my only windows machine to a colleague and won't get it back for a week or two, otherwise I would check it out myself.
OP here, there is a doc from Microsoft that talks about the changes from WSL1->WSL2, and WSL2 IS a VM. The reason it's "better" than VirtualBox or VMWare is that it's "optimized" for Windows. Which seems like a vague way of saying it uses their proprietary Hyper-V VM. I think what you're saying is true though. If you want to have fine-tuned controls, I feel like VirtualBox is nicer. I don't actually know whether or not you can go into the Hyper-V settings and manipulate memory or vCPU at all... maybe worth investigating.
It feels like part of Windows. It may not quite be there yet, but your drives just appear, you can pipe back and forth, start programs from/within either subsystem.
A VM has always felt a little cumbersome, even with all of the integrations working correctly.
It's just "there", hard to explain but the fact it's a VM is completely hidden, it's so well integrated I have a hard job believing it really is a VM now. I often shutdown WSL2 completely and when I open a bash shell back into it, it just springs into life, just a couple of seconds and it's back
Both VirtualBox and VMWare Workstation are type 2 hypervisors i.e. hosted hypervisors. This means they run on top of Windows for the most part. WSL 2 runs on Hyper-V, which is a type 1 hypervisor and therefore tends to be much more performant in practice. The integration with Windows is also much better, and the startup times are so fast it can be hard to believe it's a VM. So I wouldn't necessarily call it "just a VM".
Here's a question I've been dying to ask someone who admits this is just a VM: What makes it better than running VirtualBox or VMWare Workstation, and having a nice GUI to control the various elements of the virtualization settings?