How Stripping Legacy PC Emulation Allows Serverless MicroVMs to Boot in Five Milliseconds
By discarding virtual floppy drives and 1990s hardware controllers, modern hypervisors reduce virtual machine overhead to five megabytes. This minimal architecture allows cloud providers to launch hardware-isolated serverless functions in the time it takes a network packet to travel across a city.
Share this story
In short
- Traditional virtual machines waste hundreds of megabytes of memory and several seconds of boot time emulating 1990s-era PC hardware components.
- MicroVMs discard this legacy emulation, using paravirtualized VirtIO interfaces to boot a Linux kernel in five milliseconds with just five megabytes of overhead.
- This minimal architecture provides the hardware-level security of a virtual machine with the startup speed of a container, enabling modern serverless cloud platforms.
In 2018, Amazon Web Services engineers faced a mathematical contradiction when scaling their Lambda serverless platform. They needed to launch thousands of customer code snippets per second on a single physical server, but traditional virtual machines required hundreds of megabytes of memory and several seconds just to start.[1]
The bottleneck was not the Linux kernel itself, but the ghosts of computing past. Standard hypervisors like QEMU were designed to trick a guest operating system into believing it was running on a physical, standalone desktop computer.[2]
To achieve this illusion, the hypervisor emulated a complete 1990s-era motherboard. Every standard virtual machine booted by initializing a virtual Programmable Interrupt Controller, a virtual PCI bus, and a virtual PS/2 keyboard controller.[2]
Emulating these legacy components requires executing millions of instructions before the guest operating system can even begin loading. The hypervisor must trap and translate legacy hardware calls, consuming roughly 130 megabytes of memory just to maintain the state of hardware that does not physically exist.[2]
The MicroVM Architecture
The breakthrough came from asking what a serverless function actually needs to execute. A cloud function processing an HTTP request does not need a virtual floppy disk controller, a VGA display adapter, or an Advanced Configuration and Power Interface.[3]
Instead of emulating legacy silicon, microVM architectures like Firecracker interface directly with the Linux Kernel-based Virtual Machine (KVM) using just four paravirtualized devices. These VirtIO devices handle network, block storage, a serial console, and a one-button keyboard used solely to trigger a reboot.
Paravirtualization means the guest operating system knows it is virtualized. Rather than writing to a fake hardware register and waiting for the hypervisor to intercept the call, the guest kernel places network packets directly into a shared memory ring buffer.
Stripping out the legacy device model collapses the hypervisor's memory footprint from over 130 megabytes down to just five megabytes per instance. With no PCI bus to enumerate and no BIOS to initialize, the microVM can jump directly to executing the Linux guest kernel.[1]
Millisecond Cold Starts
This minimal initialization path allows a microVM to boot in as little as five milliseconds. In the context of a web application, five milliseconds is less time than it takes a network packet to travel from a user's smartphone in Brooklyn to a data center in Virginia.[3]
"By providing a minimal device model, Firecracker reduces memory overhead to less than 5 MB per microVM and enables heavily optimized kernels to boot in under 5 ms,"
write the authors of the original USENIX NSDI 2019 research paper detailing the architecture.
For cloud providers, this density changes the fundamental economics of serverless computing. A standard bare-metal server with 384 gigabytes of RAM can pack in thousands of idle microVMs, each consuming only a five-megabyte tax on the host system.[1]
However, marketing materials often conflate this hypervisor boot time with the actual time it takes a user's code to run. While the microVM hardware initializes in five milliseconds, loading a heavy Python or Java runtime inside that environment still introduces a noticeable cold start delay.[3]
Hardware-Level Isolation
Before microVMs, cloud providers faced a stark trade-off between speed and security. Linux containers start in milliseconds because they share the host operating system's kernel, but a kernel vulnerability could allow a malicious tenant to escape the container.
Traditional virtual machines provide strong security because KVM uses the physical processor's hardware virtualization extensions, such as Intel VT-x. The CPU itself enforces memory boundaries, ensuring one tenant cannot read another tenant's data.[2]
MicroVMs deliver the security profile of a hardware-backed virtual machine with the startup latency of a shared-kernel container. If a tenant manages to compromise the guest Linux kernel inside a microVM, they are still trapped by the physical CPU's virtualization ring.[3]
To further reduce the attack surface, the microVM monitor process itself is heavily restricted. The hypervisor runs inside a strict computing jail, utilizing Linux seccomp filters to block access to all but 21 specific system calls.
If a compromised guest manages to break out of the KVM boundary and attempts to execute a forbidden system call on the host, the Linux kernel instantly terminates the hypervisor process. This defense-in-depth strategy ensures that even a hypervisor zero-day vulnerability is difficult to exploit.[3]
The VirtIO Storage Bottleneck
While CPU and memory initialization are nearly instantaneous, attaching storage to a microVM presents a distinct engineering challenge. Traditional virtual disks rely on emulated SCSI controllers, which introduce unacceptable latency for a five-millisecond boot target.[2]
MicroVMs solve this by using the VirtIO block device specification, mapping a file on the host operating system directly into the guest as a raw block device. The hypervisor translates guest read and write operations into preadv and pwritev system calls on the host.
Because thousands of microVMs might wake up simultaneously on a single server, the hypervisor must strictly police storage bandwidth. Built-in rate limiters ensure that a single noisy neighbor cannot saturate the physical server's solid-state drives.[1]
Yet, this minimalist storage approach sacrifices advanced enterprise features. MicroVMs generally do not support live migration between physical servers or complex storage snapshots, capabilities that traditional hypervisors handle natively.[2]
The Cost of Minimalism
The ruthless elimination of legacy devices means microVMs cannot run arbitrary operating systems. Because there is no BIOS or UEFI firmware, a microVM can only boot an uncompressed Linux kernel that has been specifically compiled with VirtIO drivers.
Operating systems that expect a standard PC architecture, such as Microsoft Windows or older legacy Linux distributions, will immediately crash when attempting to boot in a microVM environment. They search for hardware controllers that simply do not exist.[2][3]
Furthermore, the stripped-down hypervisor lacks support for PCIe device passthrough. This architectural choice prevents microVMs from directly accessing physical Graphics Processing Units, limiting their utility for heavy machine learning training workloads.[3]
To address the GPU limitation, researchers are currently developing paravirtualized GPU interfaces that operate over the VirtIO framework. However, these solutions remain experimental and introduce virtualization overhead that pure passthrough avoids.
The Future of Cloud Density
Networking in a microVM relies on a similarly stripped-down architecture. Instead of emulating an Intel gigabit network card, the hypervisor uses a VirtIO network device backed by a simple TAP interface on the host machine.
When the serverless function sends an HTTP response, the guest kernel places the data directly into a memory queue. The host operating system's network stack then picks up the packet, completely bypassing the complex interrupt handling required by emulated hardware.[3]
The development of the microVM represents a fundamental shift in how the industry views virtualization. For two decades, the goal of a hypervisor was perfect backward compatibility with physical hardware.[2]
Today, the hypervisor is treated as a specialized, purpose-built component of the cloud infrastructure stack. By abandoning the illusion of the personal computer, engineers unlocked the density required to make serverless computing economically viable.[1][3]
As cloud providers continue to optimize these minimal execution environments, the boundary between the application and the hypervisor is blurring. The five-millisecond boot time is not an absolute limit, but a baseline for the next generation of transient computing.[3]
Key terms
- Hypervisor
- The software layer that creates and manages virtual machines, allocating physical CPU, memory, and storage resources to guest operating systems.
- KVM
- Kernel-based Virtual Machine, a module built into Linux that allows the operating system to function as a hypervisor utilizing physical CPU virtualization extensions.
- VirtIO
- A standardized interface that allows virtual machines to communicate directly with the hypervisor for network and storage operations, bypassing the need to emulate physical hardware.
- Paravirtualization
- A virtualization technique where the guest operating system is aware it is running in a virtual environment and uses optimized software interfaces rather than interacting with fake hardware.
- Seccomp
- A Linux kernel security feature that restricts which system calls a process can make, effectively creating a firewall between the application and the operating system.
Frequently asked
Can I run Microsoft Windows inside a microVM?
No. MicroVMs lack the BIOS and legacy hardware controllers that Windows requires to boot. They are designed exclusively for uncompressed Linux kernels compiled with specific VirtIO drivers.
Does a five-millisecond boot mean my code runs in five milliseconds?
Not necessarily. The five-millisecond metric measures the hypervisor and kernel initialization. Loading a heavy application runtime, such as a Java Virtual Machine or a large Node.js environment, will add additional cold start latency.
How does a microVM differ from a Docker container?
A Docker container shares the host server's Linux kernel, which makes it fast but vulnerable to kernel-level exploits. A microVM runs its own isolated Linux kernel backed by the physical CPU's hardware virtualization extensions.
Viewpoints in depth
Cloud Infrastructure Engineers
Prioritize execution density and startup latency to make serverless computing platforms economically viable at scale.
For the engineers building platforms like AWS Lambda or Fly.io, the hypervisor is a strict mathematical bottleneck. Every megabyte of memory consumed by the virtual machine monitor is a megabyte that cannot be sold to a customer. By stripping out legacy emulation, these engineers transformed the hypervisor from a heavy, general-purpose computer simulator into a lightweight, purpose-built boundary for untrusted code. This shift allows a single physical server to host thousands of transient workloads simultaneously, fundamentally altering the unit economics of cloud computing.
Security Researchers
Value the hardware-level isolation of KVM and strict system call filtering over the shared-kernel model of traditional containers.
Security architects view microVMs as the necessary resolution to the container security dilemma. While Linux containers (like Docker) are fast, they share a single host kernel; a single kernel exploit can compromise every tenant on the machine. MicroVMs restore the physical CPU virtualization boundary (Intel VT-x or AMD-V) while maintaining container-like speed. Furthermore, researchers emphasize that the minimal device model inherently reduces the attack surface, as there is simply less hypervisor code available to exploit.
Enterprise Workload Architects
Highlight the limitations of microVMs, noting the lack of Windows compatibility, missing live migration, and absent GPU passthrough.
Administrators managing traditional enterprise workloads point out that the speed of a microVM comes at the cost of nearly all advanced virtualization features. Because microVMs lack a PCI bus and BIOS, they cannot boot legacy operating systems or Microsoft Windows. More critically for modern workloads, the stripped-down architecture currently prevents direct PCIe device passthrough, making microVMs unsuitable for applications that require direct access to physical Graphics Processing Units for machine learning or rendering.
- Cloud Infrastructure Engineers
- Prioritize execution density and startup latency to make serverless computing platforms economically viable at scale.
- Security Researchers
- Value the hardware-level isolation of KVM and strict system call filtering over the shared-kernel model of traditional containers.
- Enterprise Workload Architects
- Highlight the limitations of microVMs, noting the lack of Windows compatibility, missing live migration, and absent GPU passthrough.
Perspectives this story doesn't cover
- Hardware Manufacturers
- Legacy Operating System Developers
Sources
[1]Amazon Web ServicesCloud Infrastructure EngineersFirecracker – Lightweight Virtualization for Serverless Computing
Read on Amazon Web Services →
[2]QEMU ProjectEnterprise Workload ArchitectsQEMU x86 System Emulator Documentation
Read on QEMU Project →
[3]Factlen Editorial TeamSecurity ResearchersSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Technology
See all →Network Protocols
How Cloud Providers Isolate Millions of Virtual Networks on Shared Physical Hardware
9 sources
Serverless Architecture
The Cold Start Penalty: How Function-as-a-Service Trades Latency for Cost and Operational Simplicity
5 sources
Cloud Infrastructure
Ukrainian Drone Strikes Disable Three Yandex Data Centers, Disrupting Russian Cloud Infrastructure
8 sources
Distributed Systems
Virtual Nodes on the Hash Ring: How Consistent Hashing Limits Key Relocation to 1/N During Cloud Cluster Rescaling
9 sources
Comments
Every angle. Every day.
Get Technology stories with full source coverage and perspective breakdowns, free every day.




