Skip to main content

ENV_DIR_MOUNTS

Constant ENV_DIR_MOUNTS 

Source
pub const ENV_DIR_MOUNTS: &str = "MSB_DIR_MOUNTS";
Expand description

Environment variable carrying virtiofs directory volume mount specs for guest init.

Format: tag:guest_path[:opts][;tag:guest_path[:opts];...]

  • tag — virtiofs tag name (required, matches the tag used in --mount)
  • guest_path — mount point inside the guest (required)
  • ro / rw — access mode option (optional)
  • noexec — disable direct execution from the mount (optional)
  • nosuid — accepted as an explicit assertion; directory mounts always use nosuid

Entries are separated by ;.

Examples:

  • MSB_DIR_MOUNTS=data:/data — mount virtiofs tag data at /data
  • MSB_DIR_MOUNTS=data:/data:ro,noexec — mount read-only and noexec
  • MSB_DIR_MOUNTS=data:/data;cache:/cache:ro — two mounts