Expand description
Firecracker-backed host backend (L2-06).
§Architecture
FirecrackerCellBackend implements the CellBackend trait by managing
one Firecracker VMM process per cell:
create— spawnsfirecracker --api-sock <socket>, waits for the socket to appear, then calls the Firecracker Management API to configure the machine (vCPUs, memory, kernel, rootfs) and boot it.destroy— sends a gracefulSendCtrlAltDelaction, waits for the process to exit, and cleans up the socket file.
§Cell command execution
The Firecracker path now runs spec.run.argv inside the guest via the
cellos-init PID-1 binary and a vsock exit-code bridge:
- The host encodes
spec.run.argvinto the kernel boot args ascellos.argv=<base64-json>. - The VM is configured with a vsock device and the host starts a matching Unix-socket listener.
cellos-initreads/proc/cmdline, forks and execs the workload inside the guest, then writes the 4-byte little-endian exit code back to the host over vsock before powering off the VM.- The supervisor calls
CellBackend::wait_for_in_vm_exit()and skips the host-side subprocess path when this backend reports an in-VM exit code.
The host-side subprocess fallback still exists for backends that do not
override wait_for_in_vm_exit(), but it is no longer the execution path for
FirecrackerCellBackend.
Modules§
- api_
client - Minimal Firecracker Management API client (HTTP/1.1 over Unix domain socket).
- pool
- Pre-booted Firecracker VM pool — L2-06-2.
Structs§
- Firecracker
Cell Backend - Firecracker-backed
CellBackend(L2-06). - Firecracker
Config
Constants§
- VSOCK_
EXIT_ PORT - vsock port that
cellos-initinside the VM connects to after the cell command exits. Must match the constant incellos-init/src/main.rs.
Functions§
- drain_
pending_ manifest_ failed_ events - Drain pending manifest-failed events (consume-on-drain).
- push_
manifest_ failed_ pending_ for_ test - Emit a manifest-failed CloudEvent onto the pending buffer. Public for
supervisor drain + FC-51 emission tests; the digest-mismatch branch in
verify_artifactscalls this with the live verification context.