HubLensCLIsmol-machines/smolvm
smol-machines

smolvm

InfraVirtualizationMicroVMLinuxCLIOCI
View on GitHub
179

// summary

smolvm is a CLI tool designed to manage and run custom Linux virtual machines with sub-second cold starts and elastic memory usage. It provides hardware-level isolation for workloads while allowing users to pack stateful machines into portable files for cross-platform execution. The tool supports OCI-compliant images and offers advanced features like SSH agent forwarding and reproducible environment configurations.

// technical analysis

smolvm is a CLI tool designed to provide hardware-isolated Linux virtual machines with sub-second boot times and elastic memory management. By leveraging libkrun and native hypervisors like Hypervisor.framework on macOS and KVM on Linux, it offers a lightweight alternative to traditional container runtimes while maintaining strong security boundaries. The project prioritizes portability and developer experience, allowing users to package stateful environments into single-file artifacts that run consistently across different host platforms without requiring a background daemon.

// key highlights

01
Achieves sub-second cold starts and <200ms boot times by utilizing a specialized hypervisor-based architecture.
02
Provides hardware-level isolation for untrusted code, ensuring host filesystem and credentials remain protected via hypervisor boundaries.
03
Supports OCI-compliant images, allowing users to pull and run standard container images from registries without needing a Docker daemon.
04
Enables the creation of portable, self-contained .smolmachine binaries that include all dependencies for consistent execution across environments.
05
Features elastic memory usage via virtio ballooning, ensuring the host only consumes resources actually utilized by the guest VM.
06
Allows secure SSH agent forwarding, enabling VMs to use host-side keys for git operations without exposing private keys to the guest environment.

// use cases

01
Sandboxing untrusted code with hardware-level isolation
02
Packing workloads into portable, self-contained executables
03
Managing persistent development environments with reproducible configurations

// getting started

To begin, install the tool using the provided curl script for macOS or Linux, or download the binary from the GitHub releases page. Once installed, you can run ephemeral workloads using the 'smolvm machine run' command or define persistent environments using a 'Smolfile' configuration. Use 'smolvm --help' to explore the full command set and manage your virtual machines.