The OpenVMM Project
A virtualization platform consists of three main components. First up, there’s the Hypervisor, a crucial piece of software that connects with the hardware directly, enabling the execution of virtual machines (VMs). Next, we have the Virtual Machine Manager (VMM), which uses the hypervisor to facilitate the operation and management of VMs throughout their lifecycle. Lastly, the host operating system (OS) is where the VMM resides, providing essential networking and storage functionalities. One notable example is OpenVMM, an open-source, cross-platform VMM project that’s crafted in Rust. This project operates under the MIT License and is developed openly on GitHub. OpenVMM is not only integrated into the OpenHCL paravisor (an execution environment that runs inside the guest VM) but can also function as a traditional VMM on a host OS.
In late 2024, we proudly announced that OpenVMM would be open-sourced. The response has been phenomenal, with our active community now boasting nearly 100 contributors and over 200 forks. We’ve seen significant contributions from industry giants like Intel and Arm, allowing the project to enhance and evolve in various areas, such as:
- Cross-platform virtualization
- Device models and emulation
- Testing infrastructure and Continuous Integration (CI) including build and release engineering
- Confidential computing
- With Intel’s help, we developed General Availability support for Intel TDX Confidential VMs in Azure openly (over 50 GitHub issues), resulting in major performance enhancements that reduced CVM performance overhead from about 3% to just 1% for CPU/memory intensive tasks.
- Thanks to contributions from Arm, we began work on a new confidential architecture, the Arm CCA Realm, achieving initial enablement for OpenHCL and TMK test infrastructure, which is already complete.
- Our partnership with AMD has allowed us to enhance paravisor performance and debugging capabilities for AMD SEV-SNP Confidential VMs, introducing improvements like Virtual NMI and streamlined logging.
- We continue to advance paravisor’s attestation and sealing features, including offering support for stateless Confidential VM mode with hardware sealing policy.
OpenVMM is also showing great potential for broader product and ecosystem integration. Contributors from the community are investigating the use of OpenVMM’s code in related projects like WSL, which is considering OpenVMM as a backend option for WSL VMs. Some contributions are focused on enhancing overall compatibility rather than just isolated repository improvements. We invite your feedback as we continue to develop OpenVMM and you can find more information on how to utilise it at https://openvmm.dev.
The aim behind creating OpenVMM focuses on three core features: cross-platform support, distributed flexibility, and a modern security framework.
There is a clear demand for a VMM that functions reliably across Windows and Linux, as well as various hypervisors. Delivering broad cross-platform support has been a primary motivation for developing OpenVMM. It accommodates several host operating systems, including Linux, Windows, and macOS. Plus, it supports different virtualization backends such as MSHV, WHP, KVM, and hypervisor.framework. OpenVMM supports both x64 and AArch64 architectures too.
OpenVMM is intended to act as a collection of VMM components that can be combined to create specialized VMMs tailored for specific scenarios. While OpenVMM can function as a traditional VMM on a host, its architecture allows for its functionality to be distributed across multiple settings. For instance, it can run within a paravisor inside a guest VM. The unique threading model this scenario requires was one of the driving factors behind OpenVMM’s creation. OpenVMM’s modular design and internal message-passing architecture enable components to be reused in different contexts without being confined to a particular “block diagram.”
Furthermore, OpenVMM is versatile enough to handle a wide array of scenarios, efficiently accommodating modern workloads while also providing support for legacy tasks. Currently, OpenVMM boasts compatibility with several boot modes: UEFI, BIOS, and Linux Direct Boot. Its extensive device support includes direct assigned devices, para-virtualized devices (both Virtio and VMBus), as well as emulated devices including vTPM, NVMe, serial UARTs, and legacy x86 devices (like i440BX, PIIX4 chipset, IDE HDD/Optical, Floppy, PCI, and VGA graphics). OpenVMM is also designed with Azure compatibility in mind, ensuring support for the Microsoft Hypervisor ABI and all Hyper-V emulated and para-virtualized devices. Thanks to OpenVMM’s modular nature, users can select from a subset of the Hyper-V guest interface or opt for an alternate interface for scenarios that have different needs.
With a keen focus on a modern and secure design, OpenVMM aims to implement as much virtualization functionality (such as emulation, instruction completion, para-virtualized devices, and memory management) as possible in user mode. This design choice enhances security through hardware memory protection and helps improve the ability to detect and fix issues promptly, leading to quicker security patches. Moreover, OpenVMM uses robust process sandboxing, which allows different VMM functionalities to run in separate processes. On Windows, this sandboxing is supported by least-privileged app containers (LPAC), while in Linux, kernel namespaces provide similar support (as well as SeLinux in the future).
Lastly, like many innovative VMMs, OpenVMM is built using Rust, which significantly diminishes chances of programming-related errors that might lead to breaches. With Safe Rust, developers need not fret about type safety or memory safety, avoiding issues like dangling pointers or use-after-free problems. The OpenVMM community has actively contributed to Rust since its inception, promoting advancements in the compiler and libraries. OpenVMM was also chosen as one of the five case studies by the Rust async working group to assess the effectiveness of the stabilised MVP version of async functions in traits, underlining its significance to the Microsoft tools as cited in Rust’s blog regarding the stabilization of async in traits in 2023! The project also benefits from ongoing Rust security initiatives, which continue to produce new open-source security tools, conduct audits, and foster a community of security experts.
Today, we’ve highlighted the origins of the OpenVMM project and its evolution since going open source. Microsoft is devoted to engaging with open-source initiatives and supporting various VMMs for users. Our aim is to empower our customers with choices that best suit their needs based on their workloads, while providing the robust performance and isolation features of the Microsoft Hypervisor – applicable across Azure, on-premises, and client scenarios. For example, we’re actively working on Cloud-hypervisor and Hyperlight, which facilitate Azure workloads. We are also investing in broad compatibility, aiming for a range of VMMs, including QEMU, to work seamlessly with the Microsoft Hypervisor to support diverse Linux workloads on Azure.
FAQ
What is OpenVMM?
OpenVMM is an open-source, cross-platform Virtual Machine Manager (VMM) developed in Rust, designed to facilitate the operation and management of virtual machines across various environments.
What are the main components of a virtualization platform?
A virtualization platform typically includes the hypervisor, the Virtual Machine Manager (VMM), and the host operating system.
How does OpenVMM enhance security?
OpenVMM employs user mode to handle critical virtualization functionalities, improving security through hardware memory protection and implementing robust process sandboxing.
Is OpenVMM compatible with different operating systems?
Yes, OpenVMM supports several host operating systems, including Linux, Windows, and macOS, and works with various virtualization backends.
How can I get involved with OpenVMM?
You can learn more about OpenVMM and how to contribute by visiting their official website at https://openvmm.dev.
Share this content:
Discover more from Qureshi
Subscribe to get the latest posts sent to your email.