Skip to main content

Module rootfs

Module rootfs 

Source
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§

CopyProvider
Full recursive copy provider — works on all platforms.
GuestLayout
Guest filesystem layout.
OverlayProvider
Overlayfs provider — near-instant CoW mounts (Linux only).
RootfsBuilder
Builder for creating guest rootfs.

Constants§

GUEST_WORKDIR
Working directory inside the guest VM.

Traits§

RootfsProvider
Abstracts how a rootfs directory is prepared for a box from a cached lower layer.

Functions§

default_provider
Auto-detect the best available rootfs provider for the current platform.
unmount_box_overlay
Unmount a box’s overlayfs merged view — best-effort and idempotent.