rust-vmm + Cloud Hypervisor trace

This exists because the original spec kept writing “rust-vmm / KVM microVMs”, which is imprecise. cube-hypervisor is a fork of Cloud Hypervisor (v28), a specific VMM built on rust-vmm crates. The distinction matters for the comparison.

What rust-vmm is

A project housing crates shared across Rust VMMs — Firecracker, Cloud Hypervisor, crosvm. Each VMM picks crates it needs and builds its own device model, API, and lifecycle on top. The crates are small and focused; the decisions about how to compose them are not.

Relevant crates used by hypervisor/:

What Cloud Hypervisor is

A production VMM that uses rust-vmm crates plus substantial original code: a device model spanning virtio-net, -blk, -fs, -rng, -balloon, -console, -vsock; a PCI root complex with passthrough (VFIO); a vhost-user frontend layer; an HTTP control API (vmm-service); a snapshot/restore implementation; ACPI tables; SGX EPC regions; vDPA support. Roughly 100k lines of Rust in the hypervisor/ tree of the CubeSandbox repo.

Upstream: cloud-hypervisor/cloud-hypervisor. Cube’s fork identifies as cube-hypervisor v28.0.0 in Cargo.toml. The upstream license headers (Apache-2.0 & BSD-3-Clause) are preserved.

What Firecracker is (for comparison)

A minimal VMM built directly on rust-vmm. Intentionally limited device set (virtio-net, -blk, -vsock, serial), no PCI, no ACPI, no passthrough, no live migration. Aimed at Lambda-style workloads — millisecond boot, small attack surface. The “Firecracker” mental model is closer to “strip rust-vmm to the minimum and go fast.”

Why the distinction matters

Cloud Hypervisor is feature-rich. It has snapshot/restore, PCI passthrough, virtio-fs, vhost-user, vDPA — capabilities that meaningfully shape what a FreeBSD equivalent must provide to match. bhyve has most of these, but:

FeatureCloud Hypervisor 28bhyve 15.0Gap
Memory snapshot/restoreStable, HTTP APIBHYVE_SNAPSHOT experimentalMaterial
virtio-fsIn-treeNot in base9p is the alternative
vhost-userFullNot in baseNeed userspace equivalent
PCI passthroughVFIOppt(4)Comparable
vDPAIn-treeNot in base
ACPI tablesGenerated in-VMMMinimalOK for Linux guests; xBSD guests okay
seccomp-bpf sandboxYesN/A — use CapsicumCapsicum arguably stronger

A comparison with “Firecracker” would miss most of these — Firecracker is a simpler target. Cube specifically picked Cloud Hypervisor, so a fair FreeBSD port has to match Cloud Hypervisor’s capability set, not Firecracker’s.

Files worth reading

Open questions