I'm running multiple VMs with the same operating system and I'd like to share my dotfiles between them. In setting up my vagrant file I originally tried:
config.vm.synced_folder "/Users/Erik/VirtualMachines/Home", "/home/vagrant", nfs: true
While I was able to log in with password, the SSH login failed - most likely becaue my home directory had the files owned by "503" and not "vagrant". When I changed this to just
config.vm.synced_folder "/Users/Erik/VirtualMachines/Home", "/home/vagrant"
Everything worked as expected, including SSH login. Is there anyway to get this to behave properly using NFS?
I've not tested this but you may be able to match UID/GID between host and guest. If you're just looking to share .files it seems like the effort and possible issues wouldn't be worth it though.