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

ImageSource

Attributes

name
str
required
Human-readable image name used for caching and identification.
kernel_url
str
required
URL to download the kernel binary.
kernel_sha256
str | None
default:"None"
Expected SHA-256 hex digest of the kernel. If None, checksum verification is skipped for the kernel.
rootfs_url
str
required
URL to download the root filesystem image.
rootfs_sha256
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

name
str
required
Image name.
kernel_path
Path
required
Absolute path to the kernel binary on the local filesystem.
rootfs_path
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 May 5, 2026