Skip to content

workspace-mount

Version 2026.149.1200
Repo superproject

Mount a virtiofs workspace share at /workspace in a VM guest via a systemd .mount unit Writes and enables /etc/systemd/system/workspace.mount so a virtiofs share tagged workspace re-mounts at /workspace on every boot (load-bearing for an autostarting VM). The mount tag is the contract between a kind:vm entity’s filesystem target: and this layer’s What=. Guest-side only — meaningful on a running VM that has the share attached; a no-op (start tolerated) at image build where no device exists. systemd-based (Arch/CachyOS, Fedora, bootc).

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run mkdir=/workspace
run write=/etc/systemd/system/workspace.mount
run command=systemctl daemon-reload || true systemctl enable workspace.mount || true systemctl start workspace.mount || true
check the systemd .mount unit is installed and declares the virtiofs type
agent-check when a workspace share is attached, /workspace is a writable virtiofs mount
check command=if ! findmnt -n /workspace >/dev/null 2>&1; then echo “WORKSPACE-OK (N/A: no /workspace share attached to this target)” exit 0 fi fstype=$(findmnt -n -o FSTYPE /workspace) if [ “$fstype” != “virtiofs” ]; then echo “FAIL: /workspace is $fstype, expected virtiofs” exit 1 fi probe=/workspace/.charly-workspace-write-probe if touch “$probe” 2>/dev/null && rm -f “$probe” 2>/dev/null; then echo “WORKSPACE-OK (virtiofs read-write at /workspace)” else echo “FAIL: /workspace virtiofs share is not writable” exit 1 fi