Install the CLI
The SDK embeds the runtime directly, so no separate server process is needed. Install the
msb CLI to manage images, volumes, and sandboxes from the terminal.microsandbox requires Linux with KVM enabled, or macOS with Apple Silicon (M-series chip). Both use hardware virtualization.
What just happened?
Here’s what actually happened behind thatSandbox.create call:
- Pulled the image from Docker Hub (or skipped this if it was already cached, since shared layers are deduplicated).
- Assembled the filesystem by stacking the image layers into a copy-on-write filesystem, so nothing you do inside the sandbox modifies the base image.
- Booted a microVM as a child process. The 512 MiB you specified is a limit, not a reservation, so the VM only uses what it actually needs.
- Started the guest agent inside the VM, which set up the environment and opened a communication channel back to the host.
exec call sent a message to that guest agent, which spawned python inside the VM, streamed stdout back, and returned the exit code. No SSH involved, no network overhead. The command channel is completely separate from the sandbox’s network stack.
Next steps
- Understand sandbox configuration: how the VM, filesystem, and networking fit together
- Run commands and stream output:
exec,shell,attach, and streaming - Control network access: policies, DNS interception, and secret protection
- Manage sandboxes with the CLI: create, inspect, and manage sandboxes from the terminal