From db8771df6809be57362477395bc4450b32dd3e74 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 25 Nov 2026 14:28:29 +0000 Subject: run-firecracker-vm: --nested, hardware virtualization for the guest Cloud Hypervisor offers its guests hardware virtualization by default (nested=on, its CPUs show svm), and Firecracker passes on whatever KVM offers (it's "not tested with nested virtualization", but has no switch), so whether a guest got it depended on the VMM, and the host's kvm settings, not on anyone's choice. Now it's off unless asked for with --nested: Cloud Hypervisor gets nested=off or on, Firecracker a custom CPU template (cpu-config) clearing SVM (CPUID 0x80000001 ECX[2]) and VMX (CPUID 1 ECX[5]), dropped with --nested. With it, and KVM in the guest's kernel (base/kernel.nix), the guest gets /dev/kvm, to run VMs itself, like NixOS VM tests. Off by default, as it opens more of the host's KVM to the guest. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 83e9a42..fe54ab0 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,11 @@ The same build also runs in [Cloud Hypervisor](https://www.cloudhypervisor.org/) instead of Firecracker, with `--vmm cloud-hypervisor`. +With `--nested`, the guest gets hardware virtualization (SVM, VMX), and +with it `/dev/kvm` (with the cut-down kernel, `base/kernel.nix`, or any +with KVM), to run VMs itself, like NixOS VM tests. It's off by default, +as it opens more of the host's KVM to the guest. + The guests run sshd. Its host key is a secret (see below), so it's not in the store, and the run script requires it: `--secret ssh_host_ed25519_key=FILE` (an ed25519 private key without passphrase). -- cgit v1.3.1