diff options
| author | tv <tv@krebsco.de> | 2026-11-25 14:26:14 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-25 15:36:16 +0100 |
| commit | e199202421b24be09aa2b3b654c8f3f82afed52d (patch) | |
| tree | 21b8d494219da126baacda98357bab03fb353c7d /base/kernel.nix | |
| parent | dfa8e35d450e30d14faabfbfbc4adad6fa7c0cbe (diff) | |
base/kernel.nix: KVM, as modules
Firecracker's guest configuration has no KVM, so a guest had no
/dev/kvm, even where the VMM offered hardware virtualization (Cloud
Hypervisor does by default, its CPUs show svm), and nothing could be
tested in a VM there, not even a NixOS VM test. Now the cut-down
kernel has KVM (and kvm-amd, kvm-intel) as modules, which udev loads
when the CPU has svm or vmx, i.e. when the VMM offers it (see
run-firecracker-vm --nested).
Diffstat (limited to 'base/kernel.nix')
| -rw-r--r-- | base/kernel.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/kernel.nix b/base/kernel.nix index fe551c5..16983c7 100644 --- a/base/kernel.nix +++ b/base/kernel.nix @@ -1,6 +1,8 @@ # Cut-down guest kernel, based on Firecracker's recommended configuration, # as a module for the base system: # nix-build pkgs/run-firecracker-vm --arg base '[ base/kernel.nix ]' +# With erofs and 9P (for the store), and KVM as modules, which load when +# the VMM offers hardware virtualization (run-firecracker-vm --nested). { pkgs, ... }: let linux = pkgs.linux_6_18; @@ -20,6 +22,10 @@ let CONFIG_EROFS_FS=m CONFIG_NET_9P=m CONFIG_9P_FS=m + CONFIG_VIRTUALIZATION=y + CONFIG_KVM=m + CONFIG_KVM_AMD=m + CONFIG_KVM_INTEL=m EOF make olddefconfig ''; |
