Microsoft could soon allow users the ability to run nested hypervisor (Hyper-V) or nested virtualization inside Linux.

For those unaware, nested virtualization is a feature that is typically designed for use by enterprises.

This feature allows you to run Hyper-V inside of a Hyper-V virtual machine (VM). It is helpful for running a Visual Studio phone emulator in a virtual machine, or testing configurations that usually require several hosts.

Jinank Jain, a senior Linux engineer at Microsoft, on Wednesday sent out a series of patches for adding support to run Linux on a nested Microsoft Hypervisor.

“This patch series plans to add support for running nested Microsoft Hypervisor. In case of nested Microsoft Hypervisor there are few privileged hypercalls which need to go L0 Hypervisor instead of L1 Hypervisor. This patches series basically identifies such hypercalls and replace them with nested hypercalls,” reads the patch notes.

  • mshv: Add support for detecting nested hypervisor
  • hv: Setup synic registers in case of nested root partition
  • hv: Add an interface to do nested hypercalls
  • hv: Enable vmbus driver for nested root partition
  • hv, mshv : Change interrupt vector for nested root partition

In the event, the patch gets successfully merged with the nested Microsoft hypervisor support, it could likely make it to the Linux kernel version 6.2 just in time.

Keep watching this space for more updates!