Snapshots
Freeze a running box and start warm clones from it.
A snapshot freezes a running box at one instant: memory, CPU state and disk. The box keeps running (it is paused for about a second) and the snapshot is a complete, restartable image: a box started from it picks up exactly there, with every process still running.
kvbox snapshots new <box> <name> # freeze a running box into a snapshot
kvbox snapshots ls # name, source box, size on disk
kvbox snapshots rm <name> # delete one (boxes made from it are not affected)
kvbox new --from <name> # start a warm clone: up in well under a secondWhat a snapshot costs
A snapshot only holds what the box touched: the memory pages the guest wrote and the blocks it changed on disk, a few hundred MB for a fresh box, not the box's 4 GB of RAM plus 8 GB of disk. Snapshots of the same box are taken incrementally (only what changed since the last one is read out of the VM, which is why the pause is short) and merged on the host into standalone images, so deleting an older snapshot never breaks a newer one.
Clones
A clone made with --from is the snapshot brought back to life under a new name and IP: the memory is mapped straight from the snapshot file and the disk is a sparse copy, so it takes about 0.3 s and the box is already up. The box itself still remembers the old name and address, so kvbox tells it who it is now through kvbox-agent, a small service in the image reached over vsock (a direct host-to-guest channel, no network involved), before plugging its network in. The source box and its clones run side by side.
Through a control plane a clone lands on the host that holds the snapshot's files.
A warm pool
The pattern snapshots are for: boot one box, install everything, start the services, snapshot it. From then on every kvbox new --from is a ready environment in under a second, for a test run, an agent, or a preview.