fn: storage_add_virtiofs
Purpose
Select an already attached Proxmox VirtioFS directory and persist its guest mount.
Behavior
- Finds available share tags in /sys/fs/virtiofs; older kernels can enter a tag manually.
- Prompts for a mount directory and displays a single confirmation.
- Never formats disks or changes the SolidGroundUX local-volume configuration.
- Refuses conflicting fstab entries, mounted targets, or nonempty destinations.
- Backs up /etc/fstab, validates changes, and restores the backup on failure.
- Rolls back newly added persistence if the mount cannot be activated.
- Honors dry-run mode.
Returns
- 0 when configured/mounted, or cancelled; otherwise non-zero.
Usage
storage_add_virtiofs
