9 breaking releases
Uses new Rust 2024
| 0.10.0 | Dec 21, 2025 |
|---|---|
| 0.9.0 | Sep 2, 2025 |
| 0.8.0 | Jun 10, 2025 |
| 0.6.0 | Oct 30, 2024 |
| 0.4.0 | Jul 24, 2024 |
#119 in Hardware support
Used in alioth-cli
1MB
29K
SLoC
Alioth
Alioth /AL-lee-oth/ is an experimental Type-2 hypervisor, written from scratch in Rust. It runs on top of an existing operating system and leverages KVM on Linux and Apple's Hypervisor framework on macOS to create and manage virtual machines.
[!IMPORTANT]
Disclaimer: Alioth is an experimental project and is NOT an officially supported Google product.
Quick Start
First, install Alioth from source using Cargo:
cargo install alioth-cli --git https://github.com/google/alioth.git
Next, create an initramfs for your guest OS. You can use a tool like u-root to do this.
Finally, boot a Linux kernel. This example starts a VM with 2 CPUs and 4 GiB of memory:
case $(uname -m) in
arm64 | aarch64)
CONSOLE=ttyAMA0
;;
x86_64)
CONSOLE=ttyS0
;;
esac
alioth -l info --log-to-file \
boot \
--kernel /path/to/vmlinuz \
--cmdline "console=$CONSOLE" \
--initramfs /path/to/initramfs \
--memory size=4G \
--num-cpu 2
Features
- Cross-Platform: Runs on
x86_64(Linux) andaarch64(Linux & macOS). - Confidential Computing: Supports confidential VMs using AMD SEV, SEV-ES, and SEV-SNP. See coco.md for more details.
- VirtIO Devices:
net: Backed by a TAP device on Linux and vmnet framework on macOS.vsock: Backed by either the host's/dev/vhost-vsockor a Unix domain socket.blk: Backed by a raw disk image.entropy: Backed by the host's/dev/urandom.fs: Backed by virtiofsd with experimental Direct Access (DAX) support.balloon: Free page reporting (Work in Progress).
- Device Passthrough: PCI device passthrough via VFIO/IOMMUFD.
- Other Emulated Devices:
Future Work
- Explore a better solution for ACPI DSDT generation to replace pre-compiled AML bytes.
- Increase test coverage across the codebase.
- Add comprehensive documentation for APIs and internal architecture.
- Focus on performance optimizations.
Acknowledgments
The design and implementation of Alioth are heavily inspired by the following projects:
The error handling approach is inspired by the
stack_trace_debug macro in
GreptimeDB.
Dependencies
~1.7–5MB
~93K SLoC