mardi, mars 31 2020, 14:00
Mounting your projet directory in vagrant on Fedora using libvirt provider
I've been struggling with mounting my projects files into vagrant. NFS was timing out and other such errors. Googling did not help. Asking on the ask fedora Forum did provide some hints and after googling a bit more I found the solution. The solution involves using sshfs instead of the default NFS mount vagrant wants to use.
So first off install vagrant-sshfs using dnf ``` sudo dnf install vagrant-sshfs ``` now you need to edit your Vagrantfile and tell vagrant not to mount the default "." on "/vagrant ``` config.vm.synced_folder ".", "/vagrant", disabled: true ``` If you don't do that vagrant will try to load it via NFS and fail. Now tell vagrant to mount using the following directive : ``` config.vm.syncedfolder ".", "/vagrant", type: "sshfs", sshfsopts_append: "-o nonempty" ```
This still did not work because ssh was failing the trick was to use SSHAUTHSOCK= vagrant up instead of just vagrant up