Skip to content

mantsana/image, cmd/oci-img-dl: add VM images and an OCI image downloader - #14

Closed
bradfitz wants to merge 1 commit into
mainfrom
bradfitz/mantsana_image
Closed

bradfitz wants to merge 1 commit into
mainfrom
bradfitz/mantsana_image

Conversation

@bradfitz

@bradfitz bradfitz commented Nov 3, 2026

Copy link
Copy Markdown
Member

These are the on-disk VM images for mantsana, a macOS CI VM backend
replacing Tart (see the DESIGN.md that follows), and a way to get them
for now.

An image is a directory of plain files: a manifest (hardware model,
machine identifier, CPUs, memory, display, MTU), a raw sparse disk, and
the macOS auxiliary storage (NVRAM). A warm subdirectory holds a saved
VM memory snapshot and the disk and NVRAM it goes with, for restoring in
seconds instead of cold booting. Snapshots are only usable on the host
OS build and at the VM size they were saved with, so WarmUsable checks,
and a failed restore can mark one stale.

cmd/oci-img-dl (package ocidl) downloads the macOS VM images corp CI uses
today, published to OCI registries such as
ghcr.io/cirruslabs/macos-tahoe-xcode, straight into such an image. Their
disks are 512 MiB chunks in Apple's LZ4 stream framing, each annotated
with its uncompressed SHA-256, which is verified. Chunks download in
parallel, all-zero pages are left as holes, and interrupted downloads
resume. It's for development and the transition; mantsana's own image
distribution will be different.

Updates tailscale/corp#39994

…ader

These are the on-disk VM images for mantsana, a macOS CI VM backend
replacing Tart (see the DESIGN.md that follows), and a way to get them
for now.

An image is a directory of plain files: a manifest (hardware model,
machine identifier, CPUs, memory, display, MTU), a raw sparse disk, and
the macOS auxiliary storage (NVRAM). A warm subdirectory holds a saved
VM memory snapshot and the disk and NVRAM it goes with, for restoring in
seconds instead of cold booting. Snapshots are only usable on the host
OS build and at the VM size they were saved with, so WarmUsable checks,
and a failed restore can mark one stale.

cmd/oci-img-dl (package ocidl) downloads the macOS VM images corp CI uses
today, published to OCI registries such as
ghcr.io/cirruslabs/macos-tahoe-xcode, straight into such an image. Their
disks are 512 MiB chunks in Apple's LZ4 stream framing, each annotated
with its uncompressed SHA-256, which is verified. Chunks download in
parallel, all-zero pages are left as holes, and interrupted downloads
resume. It's for development and the transition; mantsana's own image
distribution will be different.

Updates tailscale/corp#39994

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I54ff615054bbe0ff0e1fecfa920ffa2c947bd6e7
@bradfitz
bradfitz requested a review from a team November 3, 2026 18:30
@bradfitz bradfitz closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant