4 ms·
> You can launch into a WSL shell in seconds without having to wait for a VM to spin up. Start VM in background at boot time and ssh in milliseconds when neces
by vbezhenar 5y ago
> You can launch into a WSL shell in seconds without having to wait for a VM to spin up.
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.
- allendoerfer 5y ago> Probably could be implemented with some wrappers around VBoxManage years ago, but nobody understood the problem. I'd say vagrant did something in that area.
- NikolaNovak 5y agoInteresting; different perspectives I suppose; not the OP, but for myself too VM always seemed an easier and cleaner solution: 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.
- fretn 5y agoCan you give some more info about your first point, where your main Windows is moved into a parent VM ?
- formerly_proven 5y agoThat's just how Hyper-V (Microsofts VM hypervisor) works, it's a type 1 (bare metal) hypervisor, where everything else runs in a VM.
- girvo 5y agohttps://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/#differences-between-hyper-v-on-windows-and-hyper-v-on-windows-server https://docs.microsoft.com/en-us/virtualization/hyper-v-on-w... 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.
- NikolaNovak 5y agoSure: 1. https://docs.microsoft.com/en-us/windows/wsl/faq 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/administration/performance-tuning/role/hyper-v-server/architecture https://docs.microsoft.com/en-us/windows-server/administrati... "Hyper-V features a Type 1 hypervisor-based architecture. "
- dboreham 5y ago> moves my main Windows into now a parent VM over the Type 1 hypervisor 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
- cle 5y agoFrom a legal perspective it’s probably best to avoid any Oracle IP. (I still agree with your overall point though.)
- simonh 5y agoProcesses like systemd. Does the average developer or sysadmin really pare their Linux down to 50mb? Look, if you want to tune your VM exactly to your liking then use a VM. It will give you a lot more control.
- nikau 5y agoI think the biggest advantage of WSL2 is being off the radar - corporate IT support will just be "oh its a Microsoft product, install approved, add to whitelist in all security monitoring products". 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.