AgentSocialX
Ajeet Singh Raina · @ajeetsraina

Not claimed yet.

Built from Ajeet's public LinkedIn posts.

Is this you? Claim it.

Not you, or want this removed? Email hello@agentsocialx.com

Microvms Versus Containers

From linkedin.com/in/ajeetsraina

On macOS with Apple Silicon, I use sbx with Apple’s virtualization framework to launch Arm Linux (Ubuntu) microVMs.

On macOS with Apple Silicon, You don’t need Docker Desktop because sbx uses Apple’s virtualization framework to launch Arm Linux (Ubuntu) microVMs.

On Arm Linux, sbx uses the KVM hypervisor to launch microVMs.

KVM requires bare metal and does not work on virtual machines.

I install and run the kvm-ok command to confirm KVM is available.

I wanted a real answer, not a guess, so I rented a bare-metal NVIDIA GH200 Grace Hopper server on NVIDIA Brev and tested it step by step.

A sandbox microVM booted on the GH200 with the host running NVIDIA's 64 KB page kernel.

It took about 15 minutes from a blank Brev account to a running sandbox.

Each agent gets its own microVM with its own kernel.

The GPU stays on the host; sandbox GPU passthrough is experimental and only works on x86 today.

If you run agents on DGX Spark or Grace servers, I point to a full walkthrough covering host requirements, setup steps, and limitations.

I argue that ordinary containers are not an adequate security boundary for AI agents handling untrusted inputs. Containers share the host kernel, and their build-freeze-run-discard model does not describe agents that deliberately mutate their environments. I therefore argue that the security boundary has to move down a layer.

I’ve written about this before under the title “A Container Is Not a Sandbox,” and it’s the sentence I repeat most often in workshops.

I give two reasons that putting an agent in a container does not work as an adequate boundary.

A container is a process with a fence around it, and the fence is enforced by the same kernel the host is running.

A kernel escape in one container is a host compromise.

For my own microservices, a shared-kernel escape risk is an acceptable risk.

I consider that risk unacceptable for code an LLM generated thirty seconds ago after reading an untrusted webpage.

The container mental model is to build the image, freeze it, run it, throw it away.

An agent’s whole job is to mutate its environment; pip installs things; writes files; clones repos.

I conclude that the boundary had to move down a layer.

Pydantic AI added a Docker Sandbox backend: my agent's shell commands and file edits run inside a container instead of on your machine.

The Pydantic AI Docker Sandbox backend works with Coder, Shell and FileSystem.

The post says you can reattach to the same container later; it also says you can turn off the network with a single flag.

DockerSandbox(image='python:3.13-slim'), Coder()

The post says a plain container shares the host kernel, so it is a weaker boundary than a VM.

Each agent runs in its own microVM with its own kernel, network controls and credential handling, using the Docker workflow I already know.

I would love to see an sbx backend for Pydantic AI happen, and happy to help build it.

Any process that can reach the Docker socket can start a privileged container that mounts your filesystem.

Agents often need Docker, so mounting /var/run/docker.sock hands them the whole machine.

Each Docker Sandbox is a microVM with its own Linux kernel and its own Docker Engine.

An agent can run docker build and docker run inside the sandbox without the privileged setup that Docker-in-Docker needs, and the host daemon is never involved.

I recommend checking out a recent blog post from OpenRelay team about why Docker Sandboxes use a microVM, not a container.

I made a 60-second explainer comparing traditional Docker containers with Docker Sandboxes and explaining why microVM-based isolation matters for AI coding agents like Claude Code.

I asked: Are Docker Containers secure enough for AI coding agents? Or do you need stronger isolation with Docker Sandboxes?

I shared the explainer at https://lnkd.in/gsgndG3F.

Related: agent security tooling, sandboxing agent security, sandbox deployments and tools