microVM vs container: Isolation, deployment, and agent costs
Choose an agent runtime by isolation and compatibility. Compare microVM operations, gVisor sandboxes, full VMs, and real compute plus retained-disk costs.
A microVM is a lightweight virtual machine with its own guest kernel and a deliberately small machine model. Compared with an ordinary container, it adds a virtualization boundary; compared with a larger VM environment, it exposes fewer machine features. Agent37 offers gVisor sandboxes and full VMs, so you can choose hosted execution around your agent's compatibility, isolation, and cost requirements.
That choice matters when agents install dependencies, execute generated code, or work inside customer repositories. A cheaper environment saves nothing if your tests cannot run. A more elaborate environment adds little value if you never need its capabilities.
This guide explains the boundaries, the work behind operating microVMs, and a concrete budget for hosted alternatives. Product details and rates were checked on November 13, 2026.
What is a microVM, and how does it compare with a container?
A virtual machine runs a guest operating-system kernel. A conventional Linux container isolates processes while sharing its underlying Linux kernel. Docker's container explanation also makes an important point: you can run containers inside VMs. Packaging and isolation are separate decisions.
A microVM keeps the guest-kernel boundary while reducing the virtual hardware and machinery around it. Firecracker is one implementation, designed for services that run many isolated workloads. Its usual Linux deployment uses KVM, and its architecture gives each Firecracker process one microVM.
Several microVMs can share a physical server. A separate guest kernel does not mean a dedicated physical host, and the word βmicroβ does not specify a universal RAM limit or boot time.
Environment
Main boundary
What to check
Ordinary container
Shared Linux kernel
Permissions and host exposure
gVisor sandbox
Application kernel
Linux interface compatibility
MicroVM
Separate guest kernel
Supported devices and lifecycle
Full VM offering
Separate guest kernel
Exposed system capabilities
The cover illustrates ordinary containers versus VMs. gVisor belongs in its own category: its application kernel mediates Linux interfaces instead of simply passing application system calls to the host. See the gVisor overview for that distinction.
βFull VMβ is also a product description, not a promise of every virtualization feature. Ask whether the specific service supports your Docker daemon, kernel-dependent tools, or nested virtualization.
What the isolation boundary protects
Imagine an agent running an untrusted repository's install script. The runtime boundary limits how that script reaches the host and neighboring workloads. It does not decide whether the script should receive your production database credentials.
Choose the isolation unit around the trust boundary. Separate customers should not accidentally share writable workspaces or long-lived credentials. Multiple processes inside one guest still share that guest's resources and permissions.
For self-managed Firecracker, the production recommendations require more than launching a VM. They cover the jailer, syscall restrictions, resource limits, host configuration, and ongoing patches. Firecracker forwards guest packets to host networking; it does not itself filter outbound destinations.
Your deployment therefore needs network enforcement outside the untrusted guest. It also needs scoped credentials, restricted control-plane access, execution timeouts, and a way to terminate a runaway job. These are practical engineering requirements, not features automatically supplied by the word microVM.
For a hosted option, inspect the provider's controls. Agent37's network policy supports deny-all or an allowlist, while public internet access is the default. Deny-all blocks outbound DNS and model calls too; plan which dependencies and endpoints the task actually needs.
When a gVisor sandbox is enough
An agent that reads a CSV, calls a model, runs Python, and writes a report may need ordinary application interfaces rather than a guest kernel. The same can be true for repository edits and conventional test suites.
Start with the workload: dependencies, subprocesses, filesystem activity, network destinations, and required permissions. Then check the sandbox's application compatibility against the versions you deploy.
gVisor introduces a distinct application-kernel boundary. That can be useful for untrusted execution, but it does not implement every Linux interface. Its performance guide also explains why syscall-heavy, filesystem-heavy, and networking-heavy applications deserve measurement.
A model-waiting agent and a large native build can behave very differently on the same advertised shape. Compare completed tasks, errors, and elapsed time with your own repository. Do not infer throughput from a container or VM label.
Agent37 standard sandboxes cannot run a Docker daemon. That is a limit of this hosted runtime, not a claim that every upstream gVisor configuration has the same restriction. Our gVisor guide explains the application-kernel approach in more detail.
What running your own microVM involves
Self-hosting makes sense when you need to control the runtime and can operate its supporting services. Firecracker is a virtual machine monitor, not a complete hosted agent platform.
For its conventional KVM backend, the getting-started guide requires a supported Linux host and usable /dev/kvm access. You supply a guest kernel, a root filesystem, resource configuration, and networking. Verify virtualization access before buying a VPS for this purpose.
The current docs separately describe a Nitro Sandbox backend with different prerequisites. Do not apply the KVM checklist to every Firecracker deployment mode.
Your operating plan should cover four jobs:
Build the guest. Pin the kernel, filesystem, runtime, and dependencies. Keep a repeatable image build so new workers start from a known state.
Control the host. Configure network boundaries and resource limits, protect the management API, and maintain patches. An agent should not receive host administration credentials just to run a task.
Manage the work. Provision workers, wait for application readiness, dispatch jobs, collect results, and remove abandoned environments. Decide whether each task gets a new guest or an existing workspace.
Recover the data. Define what survives a failure and test restoring it. Budget for backing storage, logs, backups, and the people maintaining the fleet.
Use the upstream demonstration to learn the pieces. Treat production readiness as a separate project with an explicit owner and acceptance criteria.
When Agent37's full VM is the practical fit
Choose a full VM when a required capability rules out the standard sandbox. Common examples include Docker Compose test environments, Kubernetes experiments, and hardware-accelerated Android emulators.
Agent37's VM reference documents type: "vm", a separate Linux kernel, and KVM access. The agent37-ubuntu template includes Docker, Compose, and buildx. Other templates bring different software, so check the selected image.
There are still concrete constraints. The entrypoint runs as PID 1 without systemd init. Durable files belong under $HOME on the billed disk, and a custom image's Docker data directory must use that storage. The Ubuntu template configures Docker's storage for you.
The instance's type is fixed. Moving an existing standard sandbox to a VM means creating another instance and transferring the required data. VM creation also requires enough wallet balance for a day of its compute.
This is a choice between Agent37's documented standard and VM products. The general discussion of Firecracker does not establish that Agent37 uses that implementation. Select the product by its supported behavior, then validate your own workload.
Compare compute, retained disk, and useful work
Open-source runtime software does not make a host free. With self-managed microVMs, count server capacity, unused headroom, storage, operational work, and any external services. With a managed platform, inspect running-time billing, stopped storage, minimum charges, and model costs.
Agent37's published rates price standard compute at $0.80 per vCPU plus $0.70 per GB RAM per 730 hours. Full VM compute costs 2.5 times that amount. Disk costs $0.09 per GB per 730 hours for either runtime.
For 2 vCPU, 4 GB RAM, and an explicitly selected 4 GB disk, standard compute is $4.40 per 730 running hours. VM compute is $11.00. Keeping the disk for 730 hours adds $0.36.
Usage at that shape
Standard
Full VM
Run 60 hours, then delete
$0.39
$0.93
Run 60 hours, retain disk 730 hours
$0.72
$1.26
Run and retain disk 730 hours
$4.76
$11.36
The second row uses monthly compute Γ 60 / 730 + $0.36. The first prorates both compute and disk to 60 hours, with deletion immediately afterward. These are rounded infrastructure estimates, excluding model and tool spend.
An awake but idle instance still bills compute. Stop or sleep pauses compute billing; retained disk keeps billing. Auto-sleep is optional, so an idle CPU does not automatically produce the second-row price.
Disk defaults matter. Omitting resources for agent37-ubuntu gives 2 vCPU, 4 GB RAM, and 12 GB disk, which totals $12.08 for 730 running hours. That is different from the explicit 4 GB example above.
A provider's free allowance may win for a tiny workload. For sustained use, compare the bill for the actual task and retention policy. Our sandbox pricing comparison is a starting point for examining other offers.
Test startup, persistence, and recovery separately
A fast VM boot is only one part of starting an agent. Your user waits for dependency installation, credential setup, application startup, and successful execution. Measure that complete path, both on a fresh worker and a prepared workspace.
Snapshots also need precise definitions. Firecracker's snapshot documentation distinguishes guest memory, machine state, and disk backing files. Restoring a machine does not guarantee that old network connections still work. Protect snapshot files and coordinate the resources needed to restore them.
For Agent37, auto-sleep can restore running processes from saved memory, but an unusable checkpoint or host move can trigger a cold boot. Keep durable state on disk and make startup repeatable. A running instance is not evidence that your own service is ready.
Before expanding to a fleet, run one representative job through cold start, normal completion, sleep and wake, and stop and start. Confirm that artifacts survive as expected, interrupted jobs recover without duplicate side effects, and timeouts leave no abandoned workers.
Record completion time, failure rate, and billed resources. These checks turn an architecture preference into an operational decision.
Frequently asked questions
Is a microVM the same as a Docker container?
No. A microVM has its own guest kernel. An ordinary container shares its underlying kernel. Containers can run inside VMs, so you can keep container packaging while choosing a VM isolation boundary.
Does every AI agent need a microVM?
No. Choose around your threat model and runtime requirements. A compatible gVisor sandbox may meet them. A guest-kernel boundary or a specific system capability can justify choosing a VM.
Are microVMs always cheaper or faster?
No. Prices, resource reservations, storage retention, and workload behavior differ. Boot measurements alone do not show the cost or latency of completing your task.
How should I choose an Agent37 runtime?
Use standard gVisor for compatible workloads. Use a full VM when you need its documented Docker, kernel, or virtualization capabilities. Confirm persistence and recovery behavior before scaling either option.
Founder at Agent37, which runs managed hosting for OpenClaw and Hermes agents for 1,000+ users. Writes about what actually breaks when you leave an AI agent running.