Automatically generate VirtIO tag when one is not provided - #71
Draft
Sn0wCrack wants to merge 5 commits into
Draft
Automatically generate VirtIO tag when one is not provided#71Sn0wCrack wants to merge 5 commits into
Sn0wCrack wants to merge 5 commits into
Conversation
this allows mounts to be persisted in the fstab
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
marked this pull request as draft
January 4, 2026 21:42
chore: cleanup lint warnings
todo for later is to have this call the mount name capability so the code is reused but this is touch from
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the the following capabilities:
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:
Fixes #69