Skip to main content
k7d is a Rust VMM that forks running VMs — including a live multi-VM Kubernetes cluster — with memory, disk, processes, and network identity intact. Boot once, then explore dozens of byte-identical worlds for RL and agent evals. Two clocks, always together: ~105 ms to fork the minimal CI guest (a busybox initramfs running k3s, test-enforced 1 s budget) and ~1.1 s to fork a 3-node Ubuntu 24.04 cluster running k3s + Cilium + Tetragon (48 s source bring-up). Forks share memory until they diverge, so 50 CI-guest copies of a cluster fit on one 64 GB box. k7d also owns the guest clock. An episode that is mostly waiting — readiness probes, backoffs, reconcile ticks — does not have to wait in wall time: lockstep clock jumps compress an 8.7-minute guest-time episode 1.83× with zero fidelity delta, and continuous KVM time dilation runs guests at 8× wall. See Time warp. For sandboxes at scale with a CLI / API / Python SDK, see K7.

Installation

scripts/quickstart.sh — doctor-check the host, fetch the release, boot a 3-node tree, fork 4 branches. Five minutes.

CoW fork

How a 5 ms VM fork works: shared memory until write, dirty pages, reflink keyframes, byte-identical copies.

Cluster mode

Create or adopt an N-node k3s cluster and fork it without agent restarts.

Ubuntu nodes

Stock Ubuntu 24.04 guests: k3s, Cilium, Tetragon, Longhorn, ML operators on mock GPUs — all forked live.

Time warp

Lockstep clock jumps and ×N dilation: delete idle wall time without touching what the guest computes.

GRPO / tree search

Wire k7d into a trainer or an MCP agent: fork_batch, protect, prune, auto_evict under RAM budgets.

Daemon API

JSON-lines protocol on /run/k7d/k7d.sock — every VM, tree, and clock verb.

Benchmarks

Hardware, exact commands, and every enforced latency budget — both clocks.

Security model

One daemon, many VMs; what the tree jailer (nft, cgroup, seccomp) contains and what it does not.

Formal verification

Kani on unsafe paths; Aeneas→Lean on the tree budget model.

Watch it