auto; Celesto picks the right one for the host, guest, and image you are using.
How Celesto picks a backend
Celesto resolves the backend in this order:- Explicit argument -
Celesto(backend="qemu") - Environment variable -
SMOLVM_BACKEND=firecracker - Automatic default - macOS uses QEMU, Linux uses Firecracker
auto, firecracker, qemu, and libkrun.
libkrun is available as an experimental backend. Use it when you are testing libkrun specifically. Firecracker and QEMU are the stable choices for everyday sandbox work.Choose a backend
Use this table when you know what kind of host or workload you have.Comparison matrix
Firecracker
Firecracker is a small virtual machine monitor built for serverless workloads. It is the default on Linux because it starts quickly, keeps virtual hardware narrow, and works well for many short-lived sandboxes.Requirements
- Linux host
- KVM enabled
- Firecracker binary available to Celesto
- Network setup for TAP devices and nftables rules
Strengths
- Small attack surface - Firecracker exposes a narrow set of virtual devices.
- Linux production default - Celesto uses Firecracker automatically on Linux when
backend="auto". - Snapshots - Firecracker supports snapshot and restore for checkpointing and resume flows.
- vsock control - Recent Celesto images can use the Rust guest agent over vsock for low-latency commands.
Limits
- Firecracker runs on Linux hosts with KVM.
- It does not run on macOS.
- It supports fewer device types than QEMU by design.
- Windows guests require QEMU instead.
Use Firecracker from Python
Use Firecracker from the CLI
Force Firecracker for a process
QEMU
QEMU is a mature, full-featured virtualizer that works across platforms. On macOS it uses Apple’s Hypervisor Framework (HVF) for near-native performance. It is also available on Linux for environments without KVM, and is the only backend for Windows guests. On Linux x86_64 direct-kernel guests, QEMU now uses its fastermicrovm machine model by default. You can still force the older q35 model when you need broader device compatibility.
Requirements
- macOS or Linux host
- QEMU binaries available to Celesto
- KVM on Linux for hardware acceleration, or Hypervisor.framework on macOS
Strengths
- Cross-platform host support - QEMU works on macOS and Linux.
- Windows guests - Celesto uses QEMU for Windows sandbox images.
- Broad compatibility - QEMU can expose more virtual hardware than Firecracker.
- Fast Linux microvm path - QEMU uses
microvmautomatically for supported direct-kernel Linux guests.
Limits
- QEMU has a larger device model than Firecracker.
- Linux QEMU supports production TAP networking with per-sandbox isolation and outbound access controls.
q35is broader but slower than the QEMUmicrovmpath for supported Linux guests.
Use QEMU from Python
Use QEMU from the CLI
Choose a QEMU machine
Leaveqemu_machine as auto for normal use:
QEMU networking modes
QEMU supports two network modes through theqemu_network field on VMConfig:
Set
qemu_network="tap" when you are building a custom image configuration and want Linux QEMU guests to use the host TAP path.
slirp supports open access and off mode on macOS and Linux. QEMU TAP supports open, off, and restricted IPv4 destinations on Linux. In both modes, expose_local() keeps applications reachable from the host. See Network controls.
libkrun
libkrun runs Linux guests through the libkrun stack. Celesto exposes it as an experimental backend for testing the next runtime path.
Switching backends
Per sandbox
Use this when one test or workload needs a specific runtime.Per shell session
Use this when every sandbox launched by a script should use the same backend.Per application
Set the environment variable before importing Celesto.Native helper path
Recent Celesto releases move several hot host-side operations into the Rustsmolvm-core helper package. Most users do not need to call it directly; the main celesto package uses it automatically when the matching wheel is installed.
The native helpers cover:
- Linux networking setup for TAP devices, routes, and sysctls
- Sparse disk copy and zstd decompression for image startup
- QEMU monitor control for pause, resume, and snapshots
- Firecracker API socket control
smolvm-core.
Recommendations
For Linux production
Use the backend you run in production. Choose QEMU for QEMU lifecycle and networking parity, or Firecracker for its smaller device model. Both use hardware acceleration through KVM.VMConfig.qemu_network="tap". Keep the default slirp network when simple setup and open or off access are enough.
For macOS development
Useauto or qemu.
For Linux CI
Use the backend you deploy with so CI covers the same machine model, lifecycle, and networking behavior as production.For macOS CI
Use QEMU because Firecracker is Linux-only.Diagnostics
Usecelesto doctor to check backend availability before you launch sandboxes:
Troubleshooting
KVM is not available on Linux
- Verify KVM modules:
lsmod | grep kvm - Check virtualization support in your BIOS or cloud instance type.
- Run host setup again:
celesto setup - Run diagnostics:
celesto doctor --backend firecracker --strict
QEMU is not found on macOS
The wrong backend was selected
Force a backend for one command:Next steps
Control channel
See how Celesto runs commands inside a sandbox
Networking
Configure host networking and isolation
Performance
Compare boot and command latency
Troubleshooting
Fix backend and startup issues
