Professional Documents
Culture Documents
|
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.
Learn More
DevOps
Features
Shipping a Linux Kernel with Windows
Languages
.NET
Jack
Platform Development
May 6th, 2019
The kernel itself will initially be based on version 4.19, the latest long-term stable release
of Linux. The kernel will be rebased at the designation of new long-term stable releases
to ensure that the WSL kernel always has the latest Linux goodness.
In addition to the LTS source from Kernel.org, a number of local patches are being
applied. These patches tune the resulting binary for use in WSL2 by improving launch
times, reducing the memory footprint and curating a minimal set of supported devices.
The result is a small, lightweight kernel that is purpose built for WSL2 to be a drop-in
replacement for the emulation architecture featured in the design of WSL1.
However, during development it is necessary to work with local patches that enable new
features or address issues in upstream. In these cases, we either create, or find patches
that fulfill our product requirements and then work with the community to get that
code integrated as soon as possible. To protect the stability of the LTS branches, some
patches – such as for new features – might only be included in future versions of the
kernel, and not be back-ported to the current LTS version.
https://devblogs.microsoft.com/commandline/shipping-a-linux-kernel-with-windows/ 1/4
7/5/2019 Shipping a Linux Kernel with Windows | Windows Command Line Tools For Developers
When the WSL kernel source becomes available it will consist of links to a set of patches
in addition to the long-term stable source. Over time, we hope this list will shrink as
patches make it upstream and grow as we add new local patches to support new WSL
features.
Security
The WSL kernel will be built using Microsoft’s world-class CI/CD systems and serviced
through Windows Update in an operation transparent to the user. The kernel will stay
up to date with the newest features and fixes in the latest stable branch of Linux. To
ensure the provenance of our sources we mirror repositories locally. We continually
monitor Linux security mailing lists and partner with several CVE database companies to
help ensure that our kernel has the most recent fixes and mitigations.
One of the great things about Linux is its stable and backwards compatible system call
interface. This will enable us to ship the latest stable branch of the Linux kernel to all
versions of WSL2. We will rebase the kernel when a new LTS is established and when we
have sufficiently validated it.
Open Source
The kernel provided for WSL2 will be fully open source! When WSL2 is released in
Windows Insider builds, instructions for creating your own WSL kernel will be made
available on Github. We will work with developers interested in contributing to help get
changes upstream. Check back in a few weeks for more information.
Thanks!
This is the culmination of years of effort from the Linux Systems Group as well as
multiple other teams across Microsoft. We are excited to be able to share the result and
look forward to the new and interesting ways in which you will use WSL. If you are
interested in positions at Microsoft working with Linux check out this job listing.
Jack Hammons
Program Manager, Linux Systems Group
Follow Jack
Posted in Linux tools, Windows 10, Windows Subsystem for Linux (WSL)
Log in to comment
Log In
How are you going to run this kernel? Is it going to be virtualized in some way, using Hyper V technologies? Are
you creating full VM that will be started or stopped? Will this kernel delegate anything to the Windows Kernel? If
not, how are working so they can share the hardware?
TN 2019-05-06 21:51:37
Giovanni Bassi "How are you going to run this kernel? Is it going ..."
https://devblogs.microsoft.com/commandline/shipping-a-linux-kernel-with-windows/ 2/4
7/5/2019 Shipping a Linux Kernel with Windows | Windows Command Line Tools For Developers
Same questions here. + Will it have access to Windows filesystem like WSL1? Will the Linux
kernel be running on top of NT kernel? So the devices will be controlled by NT drivers and
delegated/virtualized to the Linux kernel?
Giovanni Bassi "How are you going to run this kernel? Is it going ..."
Yes it uses Hyper-V to virtualize the address space. However its not a full VM in the traditional
sense, its a light weight VM.This talk details it https://www.youtube.com/watch?
v=tG8R5SQGPck&feature=youtu.be
^--- Seems problematic. If it is using Hyper-V, will this preclude running WSL2 on Win10 in a
VM (say, Parallels)?
Thanks Shantanu. I managed to get a nested Hyper-V up on qemu-kvm this evening (since I last
posted) and indeed it looks like it will fly. Woot.
Most probably. WSL1 is pretty close to being able to run systemd as it is. Depends a bit on how
they are doing the network bridge; it isn't clear whether their modified Linux kernel is running
the Linux ipv4/ipv6 stack and they are going to tunnel at the ethernet layer, or whether they are
passing socket calls through to the Windows ip stack. Also depends on whether they are doing
NETLINK_KOBJECT_UEVENT. But even if we don't get those (or not right away), the "full system
call compatibility" mention in the Craig's WSL2 announcement blog post should be enough to
get systemd running. So short answer, yes.
https://devblogs.microsoft.com/commandline/shipping-a-linux-kernel-with-windows/ 3/4
7/5/2019 Shipping a Linux Kernel with Windows | Windows Command Line Tools For Developers
If WSL will use Hyper-V, that means that I can't use other hypervisors at the same time, am I right?
Does it mean that it will be able to run custom linux kernel modules?
Load More
Rich Turner
Sr. Program Manager
Craig Wilhite
Program Manager
Craig Loewen
Program Manager
Yosef Durr
Principal Lead
Program Manager
Sven Groot
Stay informed
NEW Surface Laptop 2 Download Center Office for students Microsoft Industry Windows Dev Center About Microsoft
NEW Surface Go Microsoft Store support Office 365 for schools Data platform Developer Network Company news
Xbox One X Returns Deals for students & Find a solution provider TechNet Privacy at Microsoft
parents
Xbox One S Order tracking Microsoft partner resources Microsoft developer Investors
Microsoft Azure in program
VR & mixed reality Store locations education Microsoft AppSource Diversity and inclusion
Channel 9
Windows 10 apps Buy online, pick up in store Health Accessibility
Office Dev Center
Office apps Financial services Security
Microsoft Garage
English (United States) Sitemap Contact Microsoft Privacy & cookies Terms of use Trademarks Safety & eco About our ads © Microsoft 2019
https://devblogs.microsoft.com/commandline/shipping-a-linux-kernel-with-windows/ 4/4