Skip to content

v0.7.15

Choose a tag to compare

@ggoodman ggoodman released this 01 Jun 15:51
8540b39

Adds rootfs image flattening APIs for exporting COW-backed filesystems.

New APIs:

const source = rootfs.compose({
  base: rootfs.builtIn("alpine:3.23"),
  overlay: blockStore,
});

const image = await rootfs.flatten({
  format: "qcow2",
  source,
  dest: imageStore,
});

for await (const chunk of rootfs.bytes(image)) {
  await upload(chunk);
}

rootfs.cow() now uses the same composed source shape as flattening, so VM boot and offline image export share one base-plus-overlay model. Flattened images are written to caller-provided block storage and can be streamed as raw image container bytes for persistence to disk, object storage, or other sinks.