Expand description
Guest rootfs management module.
This module handles preparation and management of guest rootfs for MicroVM instances. The rootfs contains the minimal filesystem required to boot the guest agent.
Two rootfs providers are available:
CopyProvider— full recursive copy (works everywhere)OverlayProvider— Linux overlayfs mount (near-instant CoW)
Structs§
- Attached
Rootfs - A temporarily attached persistent rootfs.
- Copy
Provider - Full recursive copy provider — works on all platforms.
- Guest
Layout - Guest filesystem layout.
- Overlay
Provider - Overlayfs provider — near-instant CoW mounts (Linux only).
- Rootfs
Builder - Builder for creating guest rootfs.
- Rootfs
File Info - Minimal file metadata needed to classify filesystem changes.
Constants§
- DIFF_
BASELINE_ FILE - Filename stored beside each box rootfs.
- GUEST_
WORKDIR - Working directory inside the guest VM.
Traits§
- Rootfs
Provider - Abstracts how a rootfs directory is prepared for a box from a cached lower layer.
Functions§
- attach_
persistent_ rootfs - Attach an existing platform-backed persistent rootfs for offline access.
- create_
diff_ baseline_ if_ absent - Persist the first pristine baseline for a box without ever replacing it.
- default_
provider - Auto-detect the best available rootfs provider for the current platform.
- read_
persisted_ exit_ code - Read the exit code persisted by guest-init from the active writable rootfs.
- stage_
box_ terminal_ rootfs_ metadata - Invalidate the last clean-shutdown metadata generation before launching a box, retaining it at the one-shot replay path used by guest-init.
- unmount_
box_ overlay - Unmount a box’s overlayfs
mergedview — best-effort and idempotent. - unmount_
box_ rootfs - Unmount a platform-specific writable rootfs mount.
- walk_
rootfs - Capture a rootfs tree while excluding runtime-owned control files.