3 ms·
New technical details for the impatient: WSL 2 runs a very lightweight Hyper-V VM (the same type we use for Hyper-V isolated containers) with a full Linux kern
by wmf 8y ago
New technical details for the impatient:
WSL 2 runs a very lightweight Hyper-V VM (the same type we use for Hyper-V isolated containers) with a full Linux kernel so there is no syscall translation occurring.
The lightweight Hyper-V VM, the 9P filesystem bridge and even the kernel is heavily borrowed from the kernel we use with LCOW in Azure.
these VMs use virtually allocated memory, start up in under a second and stop even faster
the Linux filesystem is now just using EXT4 directly over a virtual pmem device
sharing files/folders is fully maintained by use of a filesystem bridge using the 9P protocol, so WSL 2 sees all your Windows files and folders and you can see your Linux mounts from Windows
there is now a NIC in WSL 2. We used our NAT network mode so that NIC is fully managed and coordinated by the host, but it does have its own IP