Skip to main content
MachineVFS shows the files of the workspace’s machines at a prefix, reached through the exec each machine’s handle already holds. A workspace with machines mounts /tmp and /dev/shm this way, and "@<machine>" picks one machine’s; see Machine files.

Configure

"/tmp": "@gpu" is the same mount, written short. A machine mount needs a workspace with machines, and a name in machines or default_machine that is none of them is refused when the workspace is built.

Fields

list[str]
The machines whose files the mount shows, by their machines: names; unset shows every machine’s.
str
default:"'/'"
The path on each machine that becomes the mount root.
str
Where a new name lands when the command writing it runs no program on a machine; unset is the machine that runs the programs nothing in Mirage resolves, else the first.

Behavior

  • Caching: none; every read and listing asks the machine.
  • Placement: on several machines a read goes to the machine holding the name and a new name lands on the machine running the command’s program, else on default_machine. See Several machines.
  • Commands: a command whose every path is one machine’s own runs on that machine whole. See Where a command runs.

Integration

The machine answers these on its own side, so the bytes do not travel:
  • head -n, tail -n: head and tail there.
  • wc -l: wc -l there.
  • md5sum, sha256sum and the other hash commands: the matching sum tool.
  • grep -r and rg: grep -l there finds which files hold the text.
  • find, du, ls -R, tree: one find there.

VFS.md

The VFS.md an agent reads with a machine mount at /<path>. <mode> is the mount’s mode: read, write or exec. The commands shown are those of a write mount.
Virtual FilesystemSupported Unix Commands for VFSUnix commands work on each path as on a local filesystem, as far as the path supports them:Limitations of Unix Commands for VFSWhere a path differs from a local filesystem:Run man <cmd> or <cmd> --help for one command’s usage.