ImageSource defines the metadata for a downloadable VM image, including URLs and SHA-256 checksums for verification.
ImageSource
Attributes
Human-readable image name used for caching and identification.
URL to download the kernel binary.
Expected SHA-256 hex digest of the kernel. If
None, checksum verification is skipped for the kernel.URL to download the root filesystem image.
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:Custom Registry
UseImageSource to define custom images for ImageManager:
LocalImage
LocalImage represents a VM image that has been downloaded and cached locally.
Attributes
Image name.
Absolute path to the kernel binary on the local filesystem.
Absolute path to the root filesystem on the local filesystem.
Usage
Immutability
BothImageSource 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-inImageSource definitions:
Related
- ImageManager - Download and cache images
- ImageBuilder - Build custom images with SSH
- VMConfig - Configure VM instances
