← Back to Blog
Header image for blog post: MicroVM vs gVisor
Deborah Emeni
Published 28th April 2026

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.

TL;DR: MicroVM vs gVisor

MicroVMgVisor
Isolation modelHardware-level (KVM)Syscall interception (user-space kernel)
KernelDedicated guest kernel per workloadNo dedicated kernel (Sentry handles syscalls)
Hardware virtualisation requiredYes (KVM)No (Systrap) / Optional (KVM mode)
Boot time~125ms to ~300ms depending on VMMMilliseconds
Memory overheadLess than 5 to 10 MiB per workloadLow
I/O overheadNear-nativeSyscall tax on I/O-heavy workloads
Syscall compatibilityFull LinuxMost syscalls, some gaps
Kubernetes integrationVia Kata Containers / RuntimeClassVia RuntimeClass (runsc)
Best forActively adversarial workloads, multi-tenant platformsEnhanced container security, no nested virtualisation

What is a microVM?

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.

What is gVisor?

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.

How do the isolation models of gVisor and microVM differ?

This is the most important distinction to understand before making a decision.

microVM isolation model

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 isolation model

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:

Container isolation (3).png

Performance and overhead (microVM vs gVisor)

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.

Infrastructure requirements (microVM vs gVisor)

  • 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.

Syscall compatibility (microVM vs gVisor)

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.

When should you use a microVM?

  • 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.

When should you use gVisor?

  • 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.

Can you use both microVM and gVisor?

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.

How does Northflank run microVMs and gVisor?

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

Get started (self-serve), or book a session with an engineer if you have specific infrastructure or compliance requirements.

Frequently asked questions about microVM vs gVisor

Is gVisor safer than a microVM?

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.

Does gVisor use a VM?

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.

Can gVisor replace Firecracker?

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.

Do microVMs work without KVM?

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.

How do microVMs integrate with Kubernetes?

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.

Share this article with your network
X