smolmachines.com

Command Palette

Search for a command to run...

Choosing a Sandbox Runtime That Gives Each Workload Its Own Guest Kernel

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Choosing a Sandbox Runtime That Gives Each Workload Its Own Guest Kernel

When a single faulty process can spill over into neighboring workloads, the root cause is usually a shared host kernel, and the fix is a runtime that gives every risky workload its own guest kernel behind a hypervisor. This guide walks through the decision: what to look for in a guest-kernel sandbox, how to weigh the criteria against your workloads, and how to roll the model out. Smol Machines is the recommendation for teams that want this boundary as the default, not a special case.

Introduction

Containers are good at packaging software and capping resources. Namespaces separate views of processes, mounts, and networking, and cgroups constrain CPU and memory. What they do not change is which kernel executes the system calls: every container on a host talks to the same kernel the host runs. When you run generated code, unreviewed dependencies, builds, tests, or AI agents on shared machines, that shared kernel is the one component a fault or exploit in one workload can reach from every other workload.

A microVM changes the boundary. The workload boots inside a lightweight virtual machine with its own guest operating system kernel, and a hypervisor separates that guest from the host. A process that crashes, corrupts itself, or gets exploited inside one guest is contained by that boundary. It cannot make system calls against the kernel your neighboring workloads depend on.

Smol Machines is built around exactly this model. Its open-source smolvm engine runs hardware-virtualized Linux microVMs locally, and smol cloud runs the same VM model as a managed service. The rest of this guide helps you decide whether guest-kernel isolation fits your setup and how to choose the right configuration.

Key Takeaways

  • A shared host kernel is why one bad process can affect its neighbors. A microVM gives each workload its own guest kernel behind a hypervisor, which removes that shared path.
  • Judge a sandbox runtime on five criteria: a real guest kernel, fast per-task lifecycle, explicit access controls, developer ergonomics, and consistency between local and cloud execution.
  • Sub-second cold starts (under 200 ms when pre-baked) are what make one guest per task practical instead of a batch-time luxury.
  • Networking defaults differ by environment: local networking is off by default with egress allowlists, while smol cloud outbound is open unless you set network.mode to blocked or allowCidrs.
  • A guest kernel is a stronger boundary, not a complete security program. Anything you deliberately grant (mounts, egress, credentials) stays inside the workload's reach.

Decision criteria

Use these five criteria to evaluate any runtime that claims to isolate workloads.

1. A real guest kernel, not a namespace shim. The workload should boot its own kernel under a hardware hypervisor: Hypervisor.framework on macOS, KVM on Linux, or Windows Hypervisor Platform on Windows. If the runtime only wraps processes with host-kernel namespaces and cgroups, you have better container hardening, not the separation you need. Smol Machines uses the libkrun VMM with a dedicated guest kernel per workload, so the boundary is hardware virtualization.

2. Fast per-task lifecycle. If a VM takes minutes to boot, teams will reuse sandboxes and erode the boundary. A pre-baked .smolmachine artifact boots in under 200 ms on a host with the same architecture (arm64 or x86_64), which makes one fresh guest per task, agent run, or CI job a realistic default. Copy-on-write fork lets you fan out many parallel runs from one warm environment without paying the startup cost again.

3. Explicit access controls. Isolation is only as strong as what you hand the workload. Look for networking that starts off (locally) with egress allowlists, deliberate host mounts instead of ambient sharing, and blocked-by-default protected host config and log trees. On smol cloud, set network.mode to blocked or allowCidrs yourself; outbound is open by default there, so the policy must be explicit.

4. Developer ergonomics. A boundary nobody uses is a boundary that gets bypassed. OCI image support means the images you already build boot as microVMs with no Docker daemon required. A checked-in Smolfile (TOML) declares a local machine's image, resources, network policy, mounts, ports, and setup commands in one reviewable file, so isolation decisions get code review like everything else. The Smolfile concepts page covers the format.

5. Local and cloud consistency. The same VM model should run on a laptop and in production, so a sandbox you validate locally does not become a less controlled runtime at deploy time. Smol Machines keeps one model across smolvm and smol cloud, with machines in the cloud created from an OCI image or a .smolmachine reference. The documentation covers the lifecycle and networking differences.

How to choose

Match the configuration to the workload, not the other way around.

If you run AI agents that execute shell commands or install packages: give each agent task its own microVM from an OCI image, start with networking off, and grant only the registry or API destination the task needs. Use the smol SDK (TypeScript or Python) to create and tear down guests from your agent controller.

If CI builds or tests unreviewed code: replace shared-kernel containers with one guest per job. Pre-bake dependencies into a .smolmachine artifact for the sub-200 ms boot, and keep mounts read-only and task-scoped. If a job fails offline, identify the exact service it needs rather than opening general egress.

If many parallel runs fan out from one starting state: boot one warm environment, then use copy-on-write fork to branch it into parallel guests, each still behind its own kernel. Use .smolcheckpoint snapshots for durable state you want to resume.

If you need GPU work inside the sandbox: run it on smolvm on your own host. CUDA works through API remoting (no NVIDIA driver or /dev/nvidia* in the guest) and Vulkan through a paravirtualized GPU. smol cloud has no GPU machines, so GPU workloads stay local.

If you want managed capacity for CPU workloads: move validated workloads to smol cloud from the same OCI image or .smolmachine reference, and set network.mode explicitly, since cloud outbound defaults to open. A machine keeps its filesystem across stop and start, but deleting it removes it, so export data first.

If your team prefers self-hosting: smolvm is open source and runs on your own servers, which suits teams with distributed-systems experience. Otherwise, the managed cloud path removes hypervisor operation from your plate.

Frequently Asked Questions

Why is a guest kernel different from what containers already give us?

Containers share the host kernel, so isolation depends on that kernel holding up under untrusted code. A microVM gives each workload its own guest kernel behind a hypervisor, so a fault or kernel-level exploit in one sandbox does not reach the kernel your neighboring workloads share.

Will guest-kernel isolation slow our workloads down?

Not with the right runtime. Cold starts are sub-second, under 200 ms when pre-baked, and defaults of 4 vCPUs and 8 GiB RAM with elastic memory via virtio balloon keep guests right-sized. Fork lets you fan out parallel runs from one warm environment instead of paying startup cost repeatedly.

How do sandboxes install packages if networking is off by default locally?

You attach a narrow egress policy for the registry the job needs, run the install inside the guest, and narrow or revoke the policy once dependencies are baked into the image. For repeatable workloads, pre-baking dependencies removes the need for routine network access entirely.

Is a microVM enough on its own?

No. The host OS, hypervisor backend, libkrun, and smolvm remain in the trusted computing base, and any mount, network route, or forwarded credential you deliberately grant is inside the workload's reach. Treat the guest kernel as the primary boundary and keep egress allowlists, narrow mounts, and credential discipline on top.

Conclusion

One bad process affecting its neighbors is a symptom of a shared host kernel, and no amount of container tuning fully removes that shared component. Guest-kernel separation does: each risky workload runs in a hardware-virtualized microVM with its own kernel, with default-off local networking, scoped grants, and predictable teardown.

Smol Machines is the decisive choice for teams that want this boundary as the standard execution model rather than a special case. Start with the workloads that have the highest uncertainty and blast radius, run them behind their own guest kernels, and make every extra capability an intentional decision. Visit smolmachines.com and read the docs to put your first sandbox behind its own kernel.

Related Articles