Skip to main content
SmolVM supports two backends depending on your operating system:
  • Linux: Firecracker (KVM-based microVMs)
  • macOS: QEMU (hardware virtualization)
The backend is automatically detected based on your platform, but can be overridden via the SMOLVM_BACKEND environment variable.

Requirements

System Requirements

  • OS: Ubuntu, Debian, Fedora, or any Linux distribution with KVM support
  • Python: 3.10 or later
  • KVM: /dev/kvm must 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 execution
  • pydantic>=2.0 - Data validation and settings management
  • requests>=2.28 - HTTP client for API interactions
  • requests-unixsocket>=0.3 - Unix socket support for Firecracker API

Installation Steps

1

Install Python package

2

Run system setup script

The system setup script installs Firecracker and configures your system:
The setup script performs the following operations:
  1. Checks KVM support: Verifies /dev/kvm exists
  2. Installs system dependencies: curl, wget, jq, nftables, iproute2, e2fsprogs, openssh-client, tar
  3. Downloads and installs Firecracker: Fetches the latest Firecracker binary and installs to /usr/local/bin
  4. Adds user to KVM group: Grants access to /dev/kvm
  5. 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.
3

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.
4

Verify installation

Check that everything is installed correctly:

Advanced Installation Options

Custom Backend Selection

You can override the automatic backend detection:
In Python:

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:
If this runs without errors, your installation is complete!

Troubleshooting

If /dev/kvm doesn’t exist, ensure KVM is enabled:
For cloud VMs, ensure nested virtualization is enabled in your hypervisor settings.
Add your user to the kvm group:
Verify group membership:
Ensure /usr/local/bin is in your PATH:
Ensure Homebrew’s bin directory is in your PATH:
Linux: Ensure nftables is installed and running:
macOS: QEMU networking uses user-mode networking by default, which should work without additional configuration.
If the setup script fails during apt-get update, your repository sources may need updating:

Uninstallation

Remove SmolVM Python package

Remove system components

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