

MicroVM vs gVisor
MicroVMs and gVisor both address the same fundamental problem: standard containers share the host kernel, and that shared kernel is the attack surface. The two technologies take different architectural approaches to reducing that risk, and choosing between them comes down to your threat model, infrastructure, and workload characteristics.
This article covers how each approach works, how they compare across isolation strength, overhead, and operational complexity, and when each is the right choice.
What is Northflank?
Northflank is a full-stack cloud platform that runs both microVM-backed sandboxes and gVisor in production, applying the right isolation technology based on workload requirements. In production since 2021 across startups, public companies, and government deployments. Get started (self-serve) or book a session with an engineer for specific infrastructure or compliance requirements.
| MicroVM | gVisor | |
|---|---|---|
| Isolation model | Hardware-level (KVM) | Syscall interception (user-space kernel) |
| Kernel | Dedicated guest kernel per workload | No dedicated kernel (Sentry handles syscalls) |
| Hardware virtualisation required | Yes (KVM) | No (Systrap) / Optional (KVM mode) |
| Boot time | ~125ms to ~300ms depending on VMM | Milliseconds |
| Memory overhead | Less than 5 to 10 MiB per workload | Low |
| I/O overhead | Near-native | Syscall tax on I/O-heavy workloads |
| Syscall compatibility | Full Linux | Most syscalls, some gaps |
| Kubernetes integration | Via Kata Containers / RuntimeClass | Via RuntimeClass (runsc) |
| Best for | Actively adversarial workloads, multi-tenant platforms | Enhanced container security, no nested virtualisation |
A microVM is a lightweight virtual machine that gives each workload its own dedicated Linux kernel, enforced by hardware virtualisation via KVM. Unlike a traditional VM, a microVM strips the device model to the minimum needed for cloud workloads, keeping memory overhead in single-digit MiB and boot times in the low hundreds of milliseconds.
The key technologies that implement microVMs are Firecracker (built by AWS in Rust), Cloud Hypervisor (maintained by the Linux Foundation), and QEMU with a microVM machine type. Kata Containers is the orchestration framework that makes microVMs work natively with Kubernetes via the CRI. See What is a microVM? for a full technical breakdown, and What is KVM? for the hardware layer they build on.
gVisor is an open-source application kernel developed by Google that sandboxes containers by intercepting system calls in user space. Its core component, the Sentry, handles syscalls on behalf of the sandboxed workload without passing them to the host kernel. The host kernel's attack surface is reduced because the workload never talks to it directly.
gVisor is not a VM. It does not boot a dedicated guest kernel per workload and does not require hardware virtualisation in its default Systrap mode. In KVM mode, it uses virtualisation hardware for address space isolation, but the sandbox retains a process model rather than booting a full guest OS. See What is gVisor? for a full technical breakdown.
This is the most important distinction to understand before making a decision.
A microVM enforces isolation at the hardware level. Each workload boots its own Linux kernel inside a KVM boundary enforced by CPU hardware (Intel VT-x or AMD-V). For an attacker to escape, they must first compromise the guest kernel, then escape the KVM hypervisor layer. Those are two separate, hardware-enforced barriers.
gVisor enforces isolation at the syscall level. The Sentry intercepts syscalls and handles them in user space, so the workload never reaches the host kernel directly. The Sentry is written in Go, a memory-safe language, which eliminates a class of memory corruption vulnerabilities common in C-based kernels.
However, the sandbox does not have a hardware-enforced boundary in Systrap mode. In KVM mode, virtualisation hardware is used for address space isolation, but the sandbox still retains a process model rather than a dedicated guest kernel per workload.
For actively adversarial workloads, microVMs provide the stronger guarantee. For workloads that need meaningfully better isolation than standard containers without the overhead or infrastructure requirements of microVMs, gVisor is a practical middle ground.
See how both approaches compare against standard containers:

The two approaches make different performance tradeoffs.
- Boot time: MicroVMs boot a guest kernel, which takes approximately 125ms to 300ms depending on VMM and configuration. gVisor starts in milliseconds with no kernel boot required. For workloads that spin up frequently or need to start instantly, gVisor has an advantage.
- I/O overhead: gVisor’s syscall interception adds latency, especially on I/O-heavy workloads (often 10–30% slower). MicroVMs avoid syscall interception but incur a small overhead from virtualised device I/O (virtio). Generally, MicroVMs perform better for high-throughput I/O, while gVisor is better suited for compute-heavy tasks with infrequent syscalls.
- Memory overhead: Both are lightweight relative to traditional VMs. Firecracker targets less than 5 MiB of memory overhead per instance in benchmarks. gVisor's Sentry process adds low but non-zero overhead per sandbox. For very high workload density, the differences are worth testing against your specific workload.
- CPU-bound workloads: For workloads that are primarily CPU-bound with infrequent syscalls, gVisor's overhead is minimal. The syscall tax only materialises on workloads with high syscall frequency.
- MicroVMs require KVM. The host must support Intel VT-x or AMD-V and have KVM available. On cloud instances, this means the provider must support nested virtualisation for that instance type. Not all providers or instance types support this. Running microVMs in Kubernetes also requires Kata Containers for orchestration, which adds operational complexity.
- gVisor's Systrap mode requires no hardware virtualisation. It runs on any Linux host with no KVM requirement. This makes it the practical choice when nested virtualisation is unavailable, for example, on certain cloud instance types or environments where the host does not expose virtualisation extensions. Its KVM mode optionally uses virtualisation hardware but does not require it.
For teams already running Kubernetes, both integrate via RuntimeClass. Kata Containers provides the RuntimeClass handler for microVMs. gVisor provides runsc as its RuntimeClass handler. Both can run alongside standard container pods on the same cluster.
MicroVMs run a full Linux guest kernel, so syscall compatibility is not a concern. Any workload that runs on Linux runs inside a microVM without modification.
gVisor's Sentry re-implements Linux system interfaces but does not cover every syscall. Applications that depend on less common or recently added syscalls may not work correctly. Testing your specific workload under gVisor before deploying to production matters. For most common workloads, compatibility is not an issue. For workloads with unusual syscall requirements, a microVM is the safer choice.
- Your threat model involves actively adversarial workloads. Multi-tenant platforms where different customers or users execute arbitrary code on shared infrastructure need hardware-enforced isolation. A microVM is the stronger guarantee.
- You are running AI agent or LLM-generated code at scale. Untrusted code execution where the output cannot be audited before it runs needs the strongest available isolation boundary.
- Your workloads are I/O-heavy. Databases, high-throughput file processing, and network-intensive workloads see less overhead with microVMs than with gVisor's syscall interception.
- Your workloads have unusual syscall requirements. If your application depends on syscalls that gVisor does not implement, a microVM is the reliable path.
- KVM and nested virtualisation are available on your host.
See What is a microVM?, What is AWS Firecracker?, and What are Kata Containers? for deeper technical context.
- Nested virtualisation is unavailable on your host. gVisor's Systrap mode runs on any Linux host without KVM support.
- You want stronger container isolation without VM overhead. For workloads where container isolation is insufficient but you do not need hardware-enforced boundaries, gVisor is a practical middle ground.
- Your workloads start and stop frequently and boot time matters. Millisecond startup versus 150 to 300ms is meaningful for high-frequency, short-lived workloads.
- Your workloads are not I/O-heavy. CPU-bound workloads see minimal overhead from gVisor's syscall interception.
- You need defence-in-depth alongside other security controls. gVisor layers well with other isolation mechanisms as one part of a broader security strategy.
See What is gVisor? for a full explanation of how it works and its limitations.
Yes. MicroVMs and gVisor are complementary rather than competing. Production platforms often use both, applying the isolation technology based on workload requirements rather than using a single approach for everything.
Northflank applies this model in production. Kata Containers with Cloud Hypervisor is used as the primary approach for microVM isolation, with Firecracker applied for workloads that benefit from its minimal device model, and gVisor applied where syscall-interception isolation is sufficient or where nested virtualisation is unavailable. The isolation technology is applied based on workload requirements.
Northflank's sandbox infrastructure uses Kata Containers with Cloud Hypervisor as its primary VMM, with Firecracker and gVisor applied depending on workload requirements. The platform has been in production since 2021 across startups, public companies, and government deployments. Sandboxes spin up in approximately 1 to 2 seconds, with compute pricing starting at $0.01667 per vCPU per hour and $0.00833 per GB of memory per hour. See the pricing page for full details.
Northflank supports both ephemeral and persistent sandbox environments on managed cloud or inside your own VPC, self-serve into AWS, GCP, Azure, Oracle, CoreWeave, Civo, on-premises, or bare-metal via bring your own cloud.
Get started with Northflank sandboxes
- Sandboxes on Northflank: overview and concepts: architecture overview and core sandbox concepts
- Deploy sandboxes on Northflank: step-by-step deployment guide: step-by-step deployment guide
- Deploy sandboxes in your cloud: BYOC deployment guide: run sandboxes inside your own VPC
- Create a sandbox with the SDK: programmatic sandbox creation: programmatic sandbox creation via the Northflank JS client
Get started (self-serve), or book a session with an engineer if you have specific infrastructure or compliance requirements.
Not in general. MicroVMs provide hardware-enforced isolation via KVM, giving each workload a dedicated guest kernel that is significantly harder to escape than a software-based sandbox. gVisor provides meaningful isolation by reducing the host kernel's attack surface through syscall interception, but does not provide the same hardware-enforced boundary in Systrap mode. For actively adversarial workloads, microVMs provide the stronger guarantee.
No. gVisor does not boot a dedicated guest kernel or emulate hardware per workload. In KVM mode, it uses virtualisation hardware for address space isolation, but the sandbox retains a process model. It is an application kernel that intercepts syscalls, not a virtual machine.
It depends on your threat model. For workloads where syscall-interception isolation is sufficient and KVM is unavailable, gVisor is a practical alternative. For actively adversarial multi-tenant workloads where hardware-enforced boundaries are required, Firecracker or another microVM technology provides stronger isolation. See Firecracker vs gVisor for a detailed comparison.
No. MicroVMs require KVM, and the host CPU must support Intel VT-x or AMD-V. Without KVM support on the host, microVMs cannot run. gVisor's Systrap mode is the practical alternative in environments where KVM is unavailable.
Via Kata Containers, which implements the Container Runtime Interface so Kubernetes can schedule workloads into microVMs via RuntimeClass. See What are Kata Containers? for a full breakdown.
- What is a microVM?: how microVMs work, which technologies implement them, and when to use them
- What is gVisor?: how gVisor works, its components, and its limitations
- Firecracker vs gVisor: a focused comparison of Firecracker specifically against gVisor
- What are Kata Containers?: how Kata Containers orchestrates microVMs for Kubernetes
- Kata Containers vs Firecracker vs gVisor: how all three leading isolation technologies compare
- What is AWS Firecracker?: a full technical breakdown of Firecracker's architecture
- What is KVM?: the hardware virtualisation layer microVMs build on
- How to sandbox AI agents: isolation architectures for AI agent execution environments
- Containers vs virtual machines: the broader isolation landscape in context


