3 ms·
WSL2 uses it's own init system - only one kernel (plus a tiny initrd) is virtualized by hyper-v; each subsequent linux instance (distribution) is containerized.
by beefbroccoli 6y ago
WSL2 uses it's own init system - only one kernel (plus a tiny initrd) is virtualized by hyper-v; each subsequent linux instance (distribution) is containerized. There's additional facilities that handle resource allocation dynamically vs the user specifying a static amount during VM creation.
These (and more) result in the end-user interacting with WSL2 the same way they would any normal application. To think of it as simply a VM isn't quite correct.
- qbasic_forever 6y agoSure but I could just run Ubuntu and containerd in a VM and it's the same thing. Or just run k8s instead...
- beefbroccoli 6y agoNot quite. WSL2 dynamically uses resources as needed (`vmmem`), whereas a traditional VM requires allocating a fixed amount of RAM and CPU from the host machine.
- indigodaddy 6y agoSo I fired up Ubuntu first for my current WSL2... then I installed a Kali distribution.. are you saying that the Kali instance is really just a container inside the Ubuntu WSL2?
- beefbroccoli 6y agoNo. A minimal initrd + kernel is virtualized. Both Ubuntu and Kali are containers.
- indigodaddy 6y agoAh gotcha. Neat stuff.