When you callDocumentation Index
Fetch the complete documentation index at: https://docs.celesto.ai/llms.txt
Use this file to discover all available pages before exploring further.
vm.run(...) or vm.put_file(...), SmolVM has to send that command into the sandbox and read the result back. The connection it uses for this is the control channel. SmolVM supports two: the long-standing SSH channel and a newer vsock channel that skips the network entirely. You usually don’t need to choose — SmolVM picks the right one for you.
What this means for you
- You don’t have to change anything. SmolVM auto-selects the best channel for your host and image.
- First command runs sooner. On Linux QEMU hosts with a recent image, vsock is ready seconds after boot, before SSH is.
- No new ports or keys. vsock is a host-to-guest socket — it does not use TCP, your network, or SSH keys.
- SSH still works the same.
smolvm sshandexpose_local()continue to use real SSH.
When each channel is used
SmolVM resolves the control channel in this order:- Explicit request —
SmolVM(comm_channel="ssh" | "vsock")or the--comm-channelCLI flag. - VM config — a channel previously persisted on the sandbox.
- Auto — vsock on Linux + QEMU hosts when the guest agent answers; SSH everywhere else.
| Host / backend | Default channel |
|---|---|
| Linux + QEMU, recent image | vsock (falls back to SSH) |
| Linux + Firecracker | SSH |
| macOS + QEMU | SSH (vsock not available on macOS) |
| Windows guest | SSH |
vsock currently requires the QEMU backend on a Linux host with
vhost_vsock loaded, and a sandbox image that ships the SmolVM guest agent (locally built images already include it).Why vsock is faster
SSH on QEMU rides over the same NAT’d network your sandbox uses for the internet. The first command has to wait for:- The guest network coming up
- cloud-init finishing
sshdaccepting connections- A TCP banner exchange
/init, before sshd even starts — so the first command can run as soon as the kernel is up.
SDK usage
Thecomm_channel keyword is available on both SmolVM(...) and SmolVM.from_id(...). Leave it unset to use auto-selection.
comm_channel="vsock" is strict — if the guest agent isn’t reachable, SmolVM raises rather than silently falling back. Use the default (auto) if you want graceful fallback to SSH.CLI usage
The--comm-channel flag is available on smolvm file upload, smolvm file download, and the smolvm env subcommands:
smolvm ssh always opens a real interactive SSH session and does not accept --comm-channel.
Platform support
| Platform | vsock | SSH |
|---|---|---|
| Linux + QEMU + recent SmolVM image | ✅ | ✅ |
| Linux + Firecracker | ❌ (not wired yet) | ✅ |
| macOS | ❌ (no vhost-vsock) | ✅ |
| Windows guests | ❌ | ✅ |
Troubleshooting
comm_channel='vsock' raises on a Linux host
comm_channel='vsock' raises on a Linux host
Make sure the
vhost_vsock kernel module is loaded and the image you booted contains the SmolVM guest agent. Locally built images include it; older published images may not until they are republished.I want to force the old SSH path everywhere
I want to force the old SSH path everywhere
Pass
comm_channel="ssh" to SmolVM(...) (or --comm-channel ssh on the CLI) for the calls that should use SSH. There is no global override — the kwarg is per-VM by design.vsock works but SSH still appears in logs
vsock works but SSH still appears in logs
Some operations always use SSH:
smolvm ssh(interactive shell)vm.expose_local(...)(port forwarding rides the SSH tunnel)
Next steps
- Compare the Firecracker and QEMU backends
- Read about the networking layer
- See the SmolVM SDK reference for the full
comm_channelparameter
