Skip to content

Automatically generate VirtIO tag when one is not provided - #71

Draft
Sn0wCrack wants to merge 5 commits into
letiemble:mainfrom
Sn0wCrack:feature/mount-options
Draft

Automatically generate VirtIO tag when one is not provided#71
Sn0wCrack wants to merge 5 commits into
letiemble:mainfrom
Sn0wCrack:feature/mount-options

Conversation

@Sn0wCrack

@Sn0wCrack Sn0wCrack commented Dec 12, 2025

Copy link
Copy Markdown

This PR adds the the following capabilities:

  • Automatically generating a VirtIO mount tag when one is not provided as a mount option.
  • Automatically persisting mounts into the guest machine's fstab (if available).

Due to the restriction of 36 characters on VirtIO tags, I generate an MD5 hash of the guest path which is guaranteed to be 32 characters and be deterministic based on the input.

Unfortunately this is not compatible with defaulting to "com.apple.virtio-fs.automount" as the tag. My personal take away on this is most people use Vagrant to explicitly mount a host folder to a guest folder, however this may be different for people automating macOS.

Some additional things that can be done to this:

  • Call the mount name capability rather than rewriting the same code.

Fixes #69

this allows mounts to be persisted in the fstab
@Sn0wCrack Sn0wCrack changed the title Add Mount Options Capability Add mount options capability Dec 12, 2025
fix: tag mount option causing issues mounting directory
virtio has limit of 36-bytes in UTF-8 for the tag name of a folder.
using an md5 hash garuntees us a string of 32-bytes in length that is consistent based on the input.
@Sn0wCrack
Sn0wCrack marked this pull request as draft January 4, 2026 21:42
todo for later is to have this call the mount name capability so the code is reused but this is touch from
@Sn0wCrack Sn0wCrack changed the title Add mount options capability Automatically generate VirtIO tag when one is not provided Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic tagging of synced folders

1 participant