- 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 system setup script
The system setup script installs Firecracker and configures your system:
What does this script do?
What does this script do?
The setup script 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)
The
--configure-runtime flag configures passwordless sudo for networking commands. This is optional but recommended for seamless operation.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:Development Installation
For development with testing and linting tools:Skip Dependency Installation
If you’ve already installed dependencies manually, skip the package manager step:Verifying 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 SmolVM Python package
Remove system components
- Linux
- macOS
Next Steps
Quickstart
Start using SmolVM with simple examples
Configuration
Learn about VM configuration options
Custom Images
Build your own VM images with custom tools
API Reference
Explore the complete API