kata-firecracker-devmapper (kfd), kata-qemu-longhorn (kql), and k7d.
Deprecated aliases:
fd and ql (and the long names without the kata- prefix) are older names for kfd / kata-firecracker-devmapper and kql / kata-qemu-longhorn. They still resolve for backwards compatibility, but new configs should use the current names.At a glance
Choosing a backend
Pickkata-firecracker-devmapper when:
- You run many short-lived sandboxes per node and want the smallest possible footprint.
- You don’t need to pause, resume, fork, or persist state between restarts.
- You’re on a single node and don’t need replication.
- Security is paramount: Firecracker has the smallest attack surface, and the jailer is active (verified by
tests/integration/test_firecracker.py::test_jailer_active).
kata-qemu-longhorn when:
- You need a real persistent disk that survives pod restarts (
/mnt/statemount inside the sandbox). - You want to
pause/resume/forksandboxes at the disk level. - You run multi-node and want data to survive node failure (Longhorn replicates).
- You need bigger root disks (sized with
--root-disk-size).
k7d when:
- Fork latency matters: k7d warm-forks a running VM in ~5 ms with faithful memory, disk, process, and network state — versus ~45 s for a disk-only Longhorn fork.
- You want snapshot trees: fork many branches from a checkpoint, protect winners, prune losers, under RAM/disk budgets.
- Your workload is RL training or agent tree search over many resettable environments.
Cluster fork is a k7d feature, not a k7 feature. Forking an entire live Kubernetes cluster (~100 ms for a 3-node cluster) is done by the k7d runtime directly, through its own daemon API — see Cluster mode. k7’s
fork command clones a single sandbox.Specifying the backend
At install time
At sandbox creation time
FailedScheduling message listing which backends are.
Backend-specific behavior
kata-qemu-longhorn
- Each sandbox gets a Longhorn PVC named
<sandbox>-root-lh, defaulting to 10Gi (override with--root-disk-size 20Gior in YAML). - The container runs privileged to allow the persistence wrapper to bind-mount
/mnt/statefrom the PVC. - Image base must include
/bin/sh,tar, andmount(Debian/Ubuntu/Alpine all work). - Image
ENTRYPOINT+CMDare preserved by default — override with--entrypoint/--cmd. pausetakes a crash-consistent VolumeSnapshot before scaling to 0 (optional; pass--snapshot <name>).forksnapshots the source PVC, clones it via Longhorn’s CSI VolumeSnapshot+Restore, then creates a new Deployment pointing at the cloned PVC.
kata-firecracker-devmapper
- Sandbox storage is a per-pod logical volume on the LVM thin-pool — fast to create, lost on delete.
- The Firecracker process runs inside the jailer: a chroot, with dropped capabilities and a restrictive seccomp filter, as an unprivileged UID.
- No
pause/resume/fork— there’s no persistent disk to snapshot. --root-disk-sizehas no effect (warned by the CLI).
k7d
- Pods run as k7d microVMs via
runtimeClassName: k7— a small containerd shim talks to thek7ddaemon over/run/k7d/k7d.sock. - Fork copies the whole VM: memory, disk, processes, and network identity — not just the disk. Warm fork is ~5 ms.
- Multi-vCPU guests are supported: the vCPU count is derived from the pod’s CPU limit (
cpu: "2"boots a 2-vCPU guest), with fork/snapshot parity. - VM ops work for sandboxes on any node. The k7d daemon and its socket are node-local, but
k7 pause/resume/forkthrough the API are forwarded to thek7-agentDaemonSet pod on the sandbox’s node when needed. A fork still lands on the source’s node (cross-node fork is on the k7d roadmap). - Warm fork works for single-workload sandboxes; forking a sandbox with a sidecar is rejected (use
kqlfor that). - Per-node k7d disk-pool utilization is visible via
k7 nodes storage(see CLI reference). - See RuntimeClass k7 for how the runtime is registered, and the feature matrix for current Kubernetes feature support.
