lee-pai-long
3/8/2017 - 9:00 AM

Vagrant mount folder post provisioning

Vagrant mount folder post provisioning

[Vagrant] Post provisioning mount

config.vm.share_folder "ganja", "/test", "/test"
config.vm.provision :shell do |shell|
  shell.inline = "sudo mount -t vboxsf -o uid=`id -u apache`,gid=`id -g apache` test /test"
end

michellh comment

If you omit the guest path, it won't auto-mount. Also, the @dominis workaround is quite good. I think this is rare enough that this is satisfactory for now since this would require significant change. Sorry!

sources: https://github.com/mitchellh/vagrant/issues/936#issuecomment-7179034