pub enum RootDisk {
Managed {
size_mib: Option<u32>,
},
Tmpfs {
size_mib: Option<u32>,
},
DiskImage {
path: PathBuf,
format: DiskImageFormat,
fstype: Option<String>,
},
}Expand description
Backing for the writable rootfs layer (overlay upper) of an OCI sandbox.
This lives only on OciRootfsSource: the root disk is a property of how an OCI image
becomes a rootfs. Every user surface (CLI --root-disk, SDK builders) is sugar resolving
into this type.
Variants§
Managed
Sparse ext4 created and owned by microsandbox in the sandbox dir. Default. Persistent; grow-only via modify; deleted with the sandbox.
Tmpfs
RAM-backed upper. Ephemeral: the rootfs is pristine on every boot. Pages come from guest memory, so the size must not exceed the sandbox memory.
DiskImage
User-supplied disk image attached writable as the upper. User-owned lifecycle: never created, resized, or deleted by microsandbox.
Implementations§
Source§impl RootDisk
impl RootDisk
Sourcepub fn size_mib(&self) -> Option<u32>
pub fn size_mib(&self) -> Option<u32>
Return the configured size in MiB, if this kind carries one.
Sourcepub fn kind_str(&self) -> &'static str
pub fn kind_str(&self) -> &'static str
Return the lowercase kind tag used on the wire, in the DB, and in CLI output.
Sourcepub fn is_managed(&self) -> bool
pub fn is_managed(&self) -> bool
Whether this is the managed (default) kind.