Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Right now I’m using a full VM.

WSL2 is also a full VM



Is that so? Isn't it more like a bridge between Linux and Windows kernels, so that stuff is ultimately delegated to Windows?


WSL1 was done that way (though with a compatibility shim not a real linux kernel), but it had a number of shortcomings, primarily that I noticed in file io performance, but also in compatibility as they had to map all the syscalls themselves.

https://docs.microsoft.com/en-us/windows/wsl/compare-version...


A bridge between kernels is how most VMs work these days. The kernel inside the VM has special drivers for extra-simple 'hardware' that the host OS provides.

As opposed to WSL1 where there's a wine-esque module in the windows kernel, and there is no linux kernel at all.


It is, just with some fancy integrations that makes it more comfortable - for example memory reclamation. But it's all a fancy VM in the end.


A super fast one. After one click, within 2-3 seconds I can have an Ubuntu terminal open with wsl. To spin up a vm from let’s say VMware, I need at least 10times that.


I don't think that's magic in the hypervisor, so I doubt it affects overall performance of the VM very much. But WSL images have a special boot process instead of a full init system like systemd, which is probably where the fast startup comes from. Maybe it also has to do with how they configure storage for the VM. On real hardware with a decent SSD, Ubuntu usually gets you a graphical login in less than 10 seconds.

Anyway it's a cool feature, and I'd love to know more about how it works.


And the fact that they probably use a slimmed down kernel with just the right amount of modules, I guess.

In any case, booting Linux (the kernel) is always incredibly fast, and booting to a tty, without all the systemd units that are generally loaded, is incredibly fast per se.


WSL 1 was. WSL2 is a VM.


But a special VM.


Still a VM :)


As far as I know, both the NT kernel and the WSL2 Linux kernel use the same hypervisor below them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: