3 releases (breaking)
Uses new Rust 2024
| 0.7.0 | Apr 7, 2025 |
|---|---|
| 0.6.0 | Oct 30, 2024 |
| 0.5.0 | Sep 3, 2024 |
#4 in #serial-console
146 downloads per month
Used in 3 crates
(via serde-aco)
9KB
201 lines
Alioth
Alioth /AL-lee-oth/ is an experimental KVM-based type-2 hypervisor (virtual machine monitor) in Rust implemented from scratch.
[!IMPORTANT]
Disclaimer: Alioth is not an officially supported Google product.
Quick start
-
Install Alioth from source,
cargo install alioth-cli --git https://github.com/google/alioth.git -
Make an initramfs with u-root.
-
Boot a Linux kernel with 2 CPUs and 4 GiB memory,
alioth -l info --log-to-file \ boot \ --kernel /path/to/vmlinuz \ --cmd-line "console=ttyS0" \ --initramfs /path/to/initramfs \ --memory size=4G \ --num-cpu 2
Features
- Runs on
x86_64andaarch64. - Boots confidential VMs with AMD SEV, SEV-ES, or SEV-SNP, see coco.md for details.
- VirtIO devices
netbacked by a tap device,vsockbacked by host/dev/vhost-vsock,blkbacked by a raw-formatted image,entropybacked by host/dev/urandom,fsbacked by virtiofsd with experimental Direct Access (DAX),- (WIP)
balloonwith free page reporting.
- PCI device passthrough based on VFIO/IOMMUFD.
- Other devices
TODOs
- explore a better solution to ACPI DSDT to replace the pre-compiled AML bytes,
- increase test coverage,
- add missing documents,
- (long term) port Alioth to Apple's Hypervisor framework,
- performance, performance, and performance!
Acknowledgment
The virtualization implementation in Alioth takes the following projects as references,
The error handling practice is inspired by
GreptimeDB's
stack_trace_debug.
Dependencies
~170–580KB
~14K SLoC