all posts

Firecracker vs Apple's Containerization Framework

Ajay Kumar··9 min read

When Apple open-sourced its Containerization framework and the `container` tool alongside macOS 26, a lot of people read the headline — "each container gets its own VM" — and asked whether Apple had just built a Firecracker competitor. It's a fair question, because the two share a genuinely similar instinct: don't put untrusted-ish workloads in namespaces on a shared kernel; give each one its own real kernel inside a lightweight virtual machine. But once you look at what each is actually for, they stop looking like rivals and start looking like tools for two different jobs. Apple Containerization is how you run Linux containers on your Mac. Firecracker is how a cloud runs thousands of untrusted workloads on Linux hosts. This post is an honest head-to-head from someone who builds on the second one.

I'm Ajay — I build PandaStack, an open-source Firecracker microVM platform — and there's a nice twist here I'll get to at the end: PandaStack actually uses Apple's Virtualization.framework, via Lima, to run Firecracker for local development on M-series Macs. So this isn't a takedown of Apple's work. I like it. It's just aimed somewhere else entirely.

What Apple's Containerization framework actually is

At a high level — and I'd point you at Apple's own containerization docs for exact specifics, because the details evolve — Apple's Containerization framework is a Swift package (with an accompanying `container` CLI) that runs standard Linux OCI containers on Apple Silicon. The architectural choice that made news is that it does not run all your containers inside one shared Linux VM the way earlier Mac container tooling tended to. Instead it leans on Apple's Virtualization.framework to give each container its own lightweight Linux virtual machine, with a minimal, optimized boot path so that spinning one up feels container-fast rather than VM-slow.

The pieces that matter for this comparison, described at a level I'm confident is accurate (verify the exact API surface against Apple's documentation):

  • One VM per container. Each Linux container runs inside its own virtual machine on Virtualization.framework, rather than as a namespaced process sharing one big host or utility VM. That's the spiritual overlap with Firecracker — a real guest kernel per workload, not just cgroups and namespaces.
  • Apple Silicon + macOS only. It's built on Virtualization.framework and targets recent macOS on M-series hardware. This is not a thing you deploy to a Linux server fleet; it's a thing that runs on the Mac in front of you.
  • Swift, and open source. The framework is written in Swift and published openly, which is genuinely great for the Mac ecosystem — container tooling that's a first-class citizen of the platform instead of a VM-in-a-box bolted on.
  • Rosetta for x86. Because the host is arm64, running amd64/x86-64 Linux container images leans on Rosetta translation. That makes the huge existing catalog of x86 images usable on Apple Silicon, which is a real quality-of-life win for local dev.
  • OCI-standard images. It runs normal container images and speaks the standard container workflow, so it slots into how developers already build and pull images.

Read that list and the intent is unmistakable: this is about making container development on a Mac fast, isolated, and native. Apple's answer to the old "is a container really a VM?" debate is basically "yes — quietly, one each." And for local dev, that's a lovely answer.

Where Apple Containerization and Firecracker rhyme: both reject "namespaces on a shared kernel" as the isolation boundary for a container, and both give each workload its own guest kernel inside a lightweight VM. That shared instinct is real — it's the deployment target that pulls them apart.

What Firecracker is built for

Firecracker is a minimal virtual machine monitor (VMM) built at AWS to run untrusted, multi-tenant code on Linux hosts at very high density. It's the substrate under AWS Lambda and Fargate, which means its whole design brief is "boot a stripped-down microVM in a fraction of a second, run somebody's arbitrary code inside its own guest kernel, keep the host-facing attack surface tiny, and do that thousands of times per box." It runs on Linux with KVM. There's no device sprawl — just a handful of emulated virtio devices behind a jailer that chroots, drops privileges, and applies its own seccomp filter. The point is not developer convenience on a laptop; the point is safely running code you didn't write on shared production infrastructure.

That different brief shows up everywhere. Firecracker cares intensely about snapshot-restore (so you can skip cold boots and restore a booted machine per request), about minimizing per-VM memory so density stays high, about a small, heavily audited VMM-to-host surface, and about running on the Linux/KVM hosts that make up cloud fleets. It does not care about running on your Mac, about Rosetta, or about being a friendly local `docker`-shaped CLI — those simply aren't its problem.

Side by side

  • Isolation model — Apple Containerization: one lightweight VM per container on Virtualization.framework, each with its own guest kernel. Firecracker: one microVM per workload on KVM, each with its own guest kernel behind a jailer and a tiny virtio surface. (Same instinct — a kernel per workload — different hypervisor and host OS.)
  • Platform / OS — Apple Containerization: macOS 26 on Apple Silicon (arm64) only; built on Virtualization.framework. Firecracker: Linux hosts with KVM; the server-side substrate, cross-platform across cloud fleets.
  • Target use case — Apple Containerization: local developer container workflows on a Mac (build, run, test images natively and fast). Firecracker: running untrusted / arbitrary code as a service on shared production hosts.
  • Multi-tenant production — Apple Containerization: not its job; it's a developer tool on your machine, not a multi-tenant server platform. Firecracker: exactly its job — it's what AWS Lambda/Fargate run untrusted multi-tenant code on.
  • Snapshotting — Apple Containerization: optimized boot is the headline; treat snapshot-restore semantics as something to verify against Apple's docs rather than assume. Firecracker: first-class snapshot/restore and copy-on-write fork are core features platforms build on.
  • Ecosystem — Apple Containerization: Swift framework + `container` CLI, OCI images, Rosetta for x86, native to the Mac. Firecracker: a bare VMM you wrap with a runtime (firecracker-containerd, Kata, or a platform like PandaStack); near-total Linux compatibility because it's a real guest kernel.
The one-line trap to avoid: "Apple built a Firecracker." It didn't, and it wasn't trying to. One is how you run containers on your Mac; the other is how a cloud runs untrusted code on Linux hosts. They share an isolation instinct, not a mission.

Why they're not really competitors

The cleanest way to hold this in your head: Apple Containerization answers "how do I run containers on THIS Mac?" and Firecracker answers "how does a platform run OTHER people's code on a fleet of Linux servers?" Those questions barely overlap. If you're a developer on an M3 who wants isolated, native, fast container runs for local work, Apple's framework is a genuinely nice upgrade over stuffing everything into one shared Linux VM — and the per-container VM boundary is a real security nicety even in that local context. If you're building a product that has to execute untrusted or model-generated code for thousands of customers, you need something that lives on Linux hosts, boots in a fraction of a second at scale, snapshots and forks, and presents a minimal host-facing surface — and that's Firecracker's entire reason to exist.

You could imagine forcing a contest — could Apple's framework become a multi-tenant server runtime? could Firecracker become your daily local container tool? — but both directions are pushing a tool uphill against its purpose. Apple's is macOS/Apple-Silicon-only and built for the developer's machine; Firecracker is Linux/KVM and built for the fleet. The honest verdict isn't "X beats Y." It's "use the one whose job matches yours."

The nice twist: they cooperate on my laptop

Here's the detail I promised, and it's my favorite part. Firecracker needs Linux and KVM. My development machine is an Apple Silicon Mac, which has neither natively. So how do I run Firecracker locally? Through Apple's Virtualization.framework — the very foundation Apple's Containerization framework is built on. PandaStack's local end-to-end setup uses Lima to spin up a Linux VM on Virtualization.framework, and that VM exposes nested KVM, inside which real Firecracker microVMs boot. Apple's hypervisor stack is what makes local Firecracker development possible on an M-series Mac at all.

# Local Firecracker dev on an Apple Silicon Mac, in one sentence:
#
#   macOS  ->  Apple Virtualization.framework  ->  Lima Linux VM (nested KVM)
#          ->  Firecracker microVMs  ->  your sandbox
#
# The same Virtualization.framework that powers Apple's Containerization
# framework is what gives us nested KVM to run Firecracker locally.

# PandaStack's local e2e bootstrap brings the whole chain up:
bash scripts/mac-local-e2e.sh

# Under the hood it uses Lima to create the Linux VM on Virtualization.framework:
limactl shell pandastack-lima-vm -- sudo firecracker --version
# -> a real Firecracker microVM stack, running on your Mac, via Apple's hypervisor.

So the framing "Apple vs Firecracker" is doubly wrong for me: not only are they aimed at different jobs, they're cooperating in my dev loop. Apple's virtualization stack hosts the Linux VM; Firecracker runs inside it. That's not a rivalry; that's a stack.

Where PandaStack fits

PandaStack is the production side of this story: a Firecracker microVM platform for running untrusted and AI-generated code on Linux hosts, with the ergonomics developers expect from a container-shaped API. The reason the VM boundary is affordable at request time is snapshot-restore — every create restores a baked snapshot of an already-booted machine instead of cold-booting. A restore lands around 49ms, and an end-to-end create is roughly 179ms p50 and about 203ms p99; only the very first spawn of a template pays the ~3s cold boot. Copy-on-write forks are 400–750ms same-host and 1.2–3.5s cross-host, and each agent pre-allocates 16,384 /30 subnets so per-sandbox networking is set up in single-digit milliseconds.

# Apple's tool (on your Mac, hedge exact flags against Apple's docs):
#   container run --rm some-image python3 -c "print('hi from a per-container VM')"
#   -> a lightweight VM per container on Virtualization.framework, for LOCAL dev.
#
# PandaStack (on Linux hosts, as a service): the same shape, but built to run
# UNTRUSTED code at fleet scale via snapshot-restore.

from pandastack import Sandbox

# One Firecracker microVM, restored from a baked snapshot
# (~49ms restore; ~179ms p50 / ~203ms p99 end-to-end create).
sbx = Sandbox.create(template="base", ttl_seconds=300)

result = sbx.exec("python3 -c 'print(sum(range(100)))'")
print(result.stdout, result.exit_code)

sbx.destroy()   # the whole microVM goes away — nothing leaks to the next run

If your job is local container dev on a Mac, use Apple's framework — it's the native, fast, per-container-VM answer for that machine. If your job is running other people's code on a server fleet, you want a Firecracker-based platform, because that's the boundary and the density that problem demands. And if, like me, you're building the second on the first, enjoy the small irony that Apple's hypervisor is what boots your Firecracker microVMs locally.

The honest bottom line

Apple's Containerization framework is a genuinely good piece of work: it gives each Linux container its own lightweight VM on Virtualization.framework, boots them fast, runs x86 images via Rosetta, ships as open Swift, and makes container development on Apple Silicon a native, isolated experience. It is also macOS/Apple-Silicon-only and squarely aimed at the developer's machine — it isn't a multi-tenant production server runtime and doesn't pretend to be. Firecracker is the opposite specialist: a minimal Linux/KVM VMM built to run thousands of untrusted microVMs per host, with snapshot-restore and a tiny host-facing surface, powering AWS Lambda and platforms like PandaStack. They share the instinct that each workload deserves its own kernel; they don't share a mission. Pick by the job — local Mac container dev leans Apple, untrusted-code-as-a-service leans Firecracker — and verify Apple's exact capabilities against their containerization docs, because that surface is still moving.

Frequently asked questions

Is Apple's Containerization framework a Firecracker competitor?

Not really. They share an isolation instinct — each container gets its own lightweight VM with a real guest kernel rather than namespaces on a shared kernel — but they're built for different jobs. Apple's framework runs Linux containers on Apple Silicon Macs (macOS 26, Virtualization.framework, Swift, Rosetta for x86) and is aimed at local developer workflows. Firecracker is a Linux/KVM VMM built to run untrusted, multi-tenant code at high density on server fleets (it's the substrate under AWS Lambda and Fargate). One is how you run containers on your Mac; the other is how a cloud runs other people's code on Linux hosts. Verify Apple's exact capabilities against their containerization docs.

Can I run Apple's Containerization framework on a Linux server?

No. It's built on Apple's Virtualization.framework and targets recent macOS on Apple Silicon (arm64) hardware, so it runs on Macs, not on Linux server fleets. It's a local developer tool for container workflows on your machine. If you need to run containers or untrusted code on Linux production hosts, that's the domain of Firecracker (or a platform built on it like PandaStack), which runs on Linux with KVM. Check Apple's documentation for the current supported platforms.

Do Apple Containerization and Firecracker both give each container its own kernel?

Yes, and that's the real overlap. Apple's framework runs each Linux container inside its own lightweight VM on Virtualization.framework, so each has its own guest kernel. Firecracker runs each workload in its own microVM on KVM, also with its own guest kernel, behind a jailer and a minimal virtio device surface. Both reject the shared-kernel container model in favor of a kernel per workload. The differences are the hypervisor (Apple's Virtualization.framework vs KVM), the host OS (macOS/Apple Silicon vs Linux), and the intended scale (local dev vs untrusted multi-tenant fleets).

Which should I use for running untrusted or AI-generated code?

For running untrusted or model-generated code as a service, use Firecracker or a platform built on it. It's designed for exactly that — untrusted, multi-tenant workloads at high density on Linux hosts, with a small host-facing attack surface and snapshot-restore to keep per-create latency low. Apple's Containerization framework is a local developer tool on macOS, not a multi-tenant production runtime, so it isn't the right boundary for serving arbitrary code to many customers. On PandaStack, each sandbox is its own Firecracker microVM created via snapshot-restore (around 49ms restore; ~179ms p50 create), so a bug in the workload stays inside one disposable VM.

How does PandaStack run Firecracker on an Apple Silicon Mac?

Through Apple's Virtualization.framework — the same foundation Apple's Containerization framework is built on. Firecracker needs Linux and KVM, which an M-series Mac doesn't have natively, so PandaStack's local end-to-end setup uses Lima to create a Linux VM on Virtualization.framework, and that VM exposes nested KVM inside which real Firecracker microVMs boot. So on a developer's Mac, Apple's hypervisor stack hosts the Linux VM and Firecracker runs inside it — they cooperate rather than compete in the local dev loop.

Run code in a microVM in one API call.

49ms p50 cold start. Fork, snapshot, and scale to zero.

Start free
Written by Ajay Kumar, Founder, PandaStack.