This episode covers Firecracker observability and troubleshooting: reading logs with levels and ratelimit, pulling metrics via the /metrics API, tracing, debugging via the serial console, handling KVM errors and snapshot restore failures, and using firecracker --help and gdb when all other approaches fail.

A healthy system at the thousands-of-microVMs scale is a system that's visible. Episode 20 covers observability and troubleshooting: how Firecracker reports its condition, and how you debug failures — from boot errors to failed snapshot restores.
Why is this episode important? In the container world, debugging has a mature ecosystem. In the microVM world, it all has to be built on top of Firecracker's logs, metrics, and serial console — and most serverless platform incidents are rooted in debugging that took too long. Mastering observability means compressing recovery time from hours to minutes.
Firecracker logs go to stderr (or a redirected file). Level and format can be configured via the API:
curl --unix-socket /tmp/firecracker.sock -i \
-X PUT http://localhost/logger \
-H 'Accept: application/json' -H 'Content-Type: application/json' \
-d '{
"level": "Info",
"log_path": "/logs/firecracker.log"
}'Key points about reading logs:
Error for errors only, Info for the normal lifecycle, Debug for deep troubleshooting. Raise the level only while debugging — Debug is noisy and expensive.log_path, level, and the ratelimit interval via PUT /logger.An example of the lines you'll see while debugging:
[2026-08-13T04:00:00.000Z] [INFO] VMM
[2026-08-13T04:00:00.100Z] [WARN] FirecrackerA healthy habit: direct all VMs' logs to a central system (via log_path to a file, then tailed by an agent), and don't leave logs on ephemeral hosts.
Firecracker exposes metrics in Prometheus format at GET /metrics — lifecycle data you can scrape and alert on. Grab an example:
curl --unix-socket /tmp/firecracker.sock http://localhost/metricsAvailable metrics include:
fc_api_requests, vmm_* states, start_time/end_time.Production usage patterns:
Metrics are the objective data answering "is the system healthy" — the counterpart to logs answering "why isn't it."
To trace a request flow end-to-end (from incoming request → orchestrator → restore → resume), add tracing context to the Firecracker API:
curl --unix-socket /tmp/firecracker.sock -i \
-X PUT http://localhost/metrics/config \
-H 'Accept: application/json' -H 'Content-Type: application/json' \
-d '{ "metrics_path": "/metrics", "res_metrics": true }'Tracing here gives you correlation between API requests and Firecracker's internal operations — useful when you want to know why a restore is slow: is it snapshot disk I/O, CPU contention, or API queueing? Combine it with orchestrator tracing for a complete picture.
Tip
Start observability from three minimum sources: logs (what happened), metrics (how bad), and health checks (is the VM alive). Add tracing when you need to find causes across components. Don't build expensive tracing before logs and metrics are running.
When the guest is in trouble — boot hang, kernel panic, app not running — the serial console is the most honest window:
Inside the console you can see: kernel boot logs, where the process stopped, and what the guest says when it fails. For a guest with getty on serial, you can even log in and investigate deeper. The serial console is irreplaceable for boot debugging — no dashboard can substitute for it.
Error: KVM not available at start./dev/kvm exist? What does kvm-ok say? Is grep -cE 'vmx|svm' /proc/cpuinfo non-zero? Does the kvm group include the non-root user?PUT /snapshot/load errors.cpu_template and vcpu_count between the snapshot creator and the destination host. Mismatch is the number one cause.console=ttyS0 in the boot args? Is the kernel uncompressed? Does the rootfs have an init?409 Conflict after start.firecracker --help and gdbWhen logs aren't enough, two final tools:
firecracker --helpfirecracker --help prints every process flag — including ones not in the main documentation. It's the source of truth for what the process can be configured with.
For the hardest crash cases, gdb can attach to the Firecracker process to inspect a backtrace:
sudo gdb -p $(pgrep -f "firecracker" | head -1)Inside gdb, inspect threads and backtraces to understand the crash point. This is the final, deepest step — usually needed when facing an unknown VMM bug.
The key takeaways:
PUT /logger: configurable level, log_path, and ratelimit.GET /metrics for alerting and capacity trends.firecracker --help and gdb are the last-resort tools when logs aren't enough.In the next episode 21 we'll look behind the scenes of the project: The rust-vmm Ecosystem & Collaboration — the shared crates like kvm-ioctls, vm-memory, and virtio-devices used by Firecracker, Cloud Hypervisor, and crosvm; the monorepo evolution and RISC-V support; and the GitHub community, Slack, roadmap, and Firecracker governance.