Skip to main content
ImageSource defines the metadata for a downloadable VM image, including URLs and SHA-256 checksums for verification.

ImageSource

Attributes

str
required
Human-readable image name used for caching and identification.
str
required
URL to download the kernel binary.
str | None
default:"None"
Expected SHA-256 hex digest of the kernel. If None, checksum verification is skipped for the kernel.
str
required
URL to download the root filesystem image.
str | None
default:"None"
Expected SHA-256 hex digest of the rootfs. If None, checksum verification is skipped for the rootfs.

Usage

Without Checksum Verification

You can skip SHA-256 verification by omitting the checksum fields:
Skipping checksum verification is not recommended for production use. Always verify image integrity when possible.

Custom Registry

Use ImageSource to define custom images for ImageManager:

LocalImage

LocalImage represents a VM image that has been downloaded and cached locally.

Attributes

str
required
Image name.
Path
required
Absolute path to the kernel binary on the local filesystem.
Path
required
Absolute path to the root filesystem on the local filesystem.

Usage

Immutability

Both ImageSource and LocalImage are immutable (frozen) Pydantic models:

SHA-256 Checksum Generation

To generate SHA-256 checksums for your images:

Built-in Images

SmolVM includes these built-in ImageSource definitions:
Last modified on August 28, 2026