cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.65k stars 102 forks source link

Single mounted directory ignore tag or prefix name #748

Closed nd-brown closed 3 months ago

nd-brown commented 3 months ago

Since v2.6.0 the --dir parameter does not mount single directory.

If you try to mount only one directory using argument --dir=config:/path/to/config:ro all content will be mounted directly to /Volumes/My Shared Files.

If you try to mount only one directory using argument --dir=/path/to/config:ro,tag=config the folder will not mount at all.

However mounting 2 folders with --dir argument works fine. I suspect that changes made here #733 , is the reason of that issue.

fkorotkov commented 3 months ago

Since you are using tag=config which overrides the tag from an "auto-montable" to your custom one, you need manually mount the directory inside the VM:

mkdir ~/config
mount_virtiofs config ~/config
fkorotkov commented 3 months ago

@edigaryev noted that I missed that --dir=config:/path/to/config:ro mounts to /Volumes/My Shared Files and not /Volumes/My Shared Files/config. #750 fixes it.

nd-brown commented 3 months ago

@fkorotkov @edigaryev Thank you!