- Linux: Firecracker (KVM-based microVMs)
- macOS: QEMU (hardware virtualization)
SMOLVM_BACKEND environment variable.
Requirements
System requirements
- Linux
- macOS
- OS: Ubuntu, Debian, Fedora, or any Linux distribution with KVM support
- Python: 3.10 or later
- KVM:
/dev/kvmmust be accessible - Architecture: x86_64 (amd64)
- Dependencies:
ip,nft,ssh,wget,tar
Python dependencies
SmolVM requires the following Python packages (installed automatically via pip):paramiko>=3.0- SSH client for guest command executionpydantic>=2.0- Data validation and settings managementrequests>=2.28- HTTP client for API interactionsrequests-unixsocket>=0.3- Unix socket support for Firecracker API
Installation steps
- Linux (Firecracker)
- macOS (QEMU)
Run one-time setup
Run the built-in setup command to install Firecracker and configure your system:Linux may prompt for
sudo during setup so it can install host dependencies and configure runtime permissions.What does setup do?
What does setup do?
The setup command performs the following operations:
- Checks KVM support: Verifies
/dev/kvmexists - Installs system dependencies:
curl,wget,jq,nftables,iproute2,e2fsprogs,openssh-client,tar - Downloads and installs Firecracker: Fetches the latest Firecracker binary and installs to
/usr/local/bin - Adds user to KVM group: Grants access to
/dev/kvm - Configures runtime sudoers: Sets up passwordless sudo for specific SmolVM commands (
ip,nft)
Activate KVM group membership
After setup, activate the KVM group:Or log out and log back in for the group changes to take effect permanently.
Advanced installation options
Custom backend selection
You can override the automatic backend detection:Installing with Docker support
For building custom images, you may want Docker installed:Optional extras
SmolVM includes optional dependency groups you can install depending on your use case:| Extra | What it includes |
|---|---|
examples | pydantic-ai, openai-agents, langchain, langchain-openai, openai, playwright |
dashboard | fastapi, uvicorn, websockets |
all | All of the above |
Development install
For development with testing and linting tools:Skip dependency installation
If you’ve already installed dependencies manually, skip the package manager step:Verifying your installation
System diagnostics
SmolVM includes a diagnostic tool to verify your setup:Test your first VM
Run a simple test to ensure everything works:Troubleshooting
Linux: KVM not available
Linux: KVM not available
If For cloud VMs, ensure nested virtualization is enabled in your hypervisor settings.
/dev/kvm doesn’t exist, ensure KVM is enabled:Linux: Permission denied on /dev/kvm
Linux: Permission denied on /dev/kvm
Add your user to the Verify group membership:
kvm group:Linux: Firecracker not found after installation
Linux: Firecracker not found after installation
Ensure
/usr/local/bin is in your PATH:macOS: qemu-system not found
macOS: qemu-system not found
Ensure Homebrew’s bin directory is in your PATH:
Network connectivity issues
Network connectivity issues
Linux: Ensure macOS: QEMU networking uses user-mode networking by default, which should work without additional configuration.
nftables is installed and running:apt-get update failures on Linux
apt-get update failures on Linux
If the setup script fails during
apt-get update, your repository sources may need updating:Uninstallation
Remove the SmolVM Python package
Remove system components (optional)
- Linux
- macOS
Next steps
Quickstart
Run your first sandbox in minutes
Basic usage
Learn about VM configuration options
Custom images
Build your own VM images with custom tools
API reference
Explore the complete API