Daemonize the jailer so Firecracker runs in the background, and reliably find/kill the Firecracker process afterwards
domain: github.com/firecracker-microvm/firecracker · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗
Documented steps
Add `--daemonize` to the jailer invocation: the jailer calls setsid() to join a new session/process group and detach from the controlling terminal, then redirects STDIN, STDOUT and STDERR to /dev/null.
Optionally add `--new-pid-ns` to spawn Firecracker in a new PID namespace (libc clone() with CLONE_NEWPID); the child becomes the pseudo-init(1) of the namespace, giving extra resilience.
Find the Firecracker PID by reading `<exec_file_name>.pid` (e.g. `firecracker.pid`) in the jail root directory — the jailer stores the child PID there in ALL cases, whether or not --new-pid-ns was used.
Interact with the daemonized VM through the API socket inside the jail: `curl --unix-socket <chroot_base>/<exec_file_name>/<id>/root/run/firecracker.socket http://localhost/` (default chroot base is /srv/jailer).
To stop the VM, signal the PID from the .pid file — do not assume killing the jailer is enough.
Official doc: https://github.com/firecracker-microvm/firecracker/blob/main/docs/jailer.md
Known gotchas
With --daemonize but WITHOUT --new-pid-ns, Firecracker gets a different PID from the jailer, and killing the jailer will NOT kill the Firecracker process — always use the `firecracker.pid` file in the jail root.
The jailer can only log to stdout/stderr, which is why the --daemonize redirection logic runs toward the END of jailer setup rather than at the beginning — early jailer errors still print to the launching terminal.
--daemonize redirects all three standard I/O descriptors to /dev/null, so the guest serial console output is discarded; use the Firecracker logger (PUT /logger) for diagnostics instead.
Give your agent this knowledge — and 18,200+ more routes
One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?