Microsoft has submitted a series of patches to the Linux kernel with its aim being “to create a complete virtualization stack with Linux and Microsoft Hypervisor.”
The patches are designated “RFC” (Request for comments) and are a minimal implementation presented for discussion.
The key change is that with the patched kernel, Linux will run as the Hyper-V root partition. In the Hyper-V architecture, the root partition has direct access to hardware and creates child partitions for the VMs it hosts. “Just think of it like Xen’s Dom0,” said Microsoft principal software engineer Wei Liu.
Hyper-V’s architecture is more similar to Xen than it is to KVM or to VMware’s ESXi, and Liu acknowledged that “we drew inspiration from the Xen code in Linux,” specifically for code handing interrupts. Until now, the Hyper-V root partition had to run Windows.
In the Hyper-V architecture, the root partition has direct access to the hardware and creates child partitions for the VMs. It runs on top of the privileged ring -1 Microsoft Hypervisor
Microsoft has also ported Intel’s open-source Cloud Hypervisor, a Virtual Machine Monitor (VMM) written in Rust that normally runs on KVM, the hypervisor that is built into the Linux kernel. Cloud Hypervisor itself is currently in “very early pre-alpha stage”.
Even when Linux is the root partition, it will still run on top of Microsoft’s hypervisor, a thin layer running with ring -1 privileges. It will no longer be necessary to run Windows on that hypervisor, though, enabling Microsoft to call the new arrangement “a complete virtualization stack with Linux”.
DirectX comes to Linux (via WSL2): Microsoft unveils tricks needed to flash a GPU at a penguin
With these changes, Microsoft likely has its Azure cloud infrastructure in mind. Azure runs more Linux than Windows, as acknowledged back in July 2019 by Microsoft engineer Sasha Levin who said: “The Linux usage on our cloud has surpassed Windows.” The proportion of Linux workloads looks set to increase with the trend towards Kubernetes, which is primarily a Linux technology. Linux already runs well on Hyper-V with a Windows root partition, but making this a complete Linux stack may improve performance.
Microsoft is also busy improving Linux support in Windows 10, thanks to the Windows Subsystem for Linux (WSL 2), and now ships a Linux kernel with Windows. GUI support has been promised. WSL 2 also uses Hyper-V, and Windows 10 is on a path to becoming a hybrid Windows/Linux system, though as of now this is mainly of interest to developers.
Microsoft’s Ignite virtual shindig is next week and we can expect the company to say more about its Linux plans then. ®