Skip to content

Use copy-on-write cloning for repository-private microVM rootfs #2296

Closed

Description

@JAORMX

Problem

Mecatl reuses the admitted execution-image cache, but its repository-private writable rootfs currently goes through cloneRootFS -> copyTree, which creates separate file trees using ordinary file copying. It does not explicitly use the filesystem's copy-on-write cloning facilities.

An old macOS development-validation installation occupied about 9.3 GiB across caches, repository state, downloads and binaries. That aggregate is motivation, not a measured estimate of duplication or promised savings; the installation has since been removed.

The pinned go-microvm dependency already exposes rootfs.CloneDir, with APFS cloning on macOS, Linux reflinks, and a copy fallback.

Proposed scope

Use the existing go-microvm cloning primitive when materializing the repository-private writable rootfs. Preserve isolation, error handling, filesystem semantics required by Mecatl, and persistent repository state. Check helper differences (including permissions, ownership and symlinks) before substitution.

Do not change verified-artifact admission/snapshot copying, retained launch-artifact copying, image-cache layout, runtime namespace selection, or upgrade/recovery behavior in this issue.

Acceptance criteria

  • Writable rootfs creation uses existing platform-aware copy-on-write support where available and retains a safe copy fallback.
  • Offline tests demonstrate that mutations to one writable rootfs do not affect the source or another clone; relevant copy/error and filesystem semantics are covered.
  • No new dependency is introduced if the already-pinned go-microvm API suffices.
  • Required local validation and CI pass; any physical-space claims are supported by measurements, not inferred from use of the helper.
  • Assess API and stored-state compatibility; no contract or storage migration is intended.

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. added a commit that references this issue on Oct 14, 2026
    3145b60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions