Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant fails to mount NFS shared folders because of corrupted /etc/exports. How do I fix that file?

Tags:

vagrant

nfs

I recently tried to install a VM with vagrant but "vagrant up" always failed with the error:

Mounting NFS shared folders failed. This is most often caused by the NFS client software not being installed on the guest machine. Please verify that the NFS client software is properly installed, and consult any resources specific to the linux distro you're using for more information on how to do this.

NFS client was properly installed on my machine so I looked for other causes of errors and found a blogpost explaining that my /etc/exports might be corrupted. I restored exportsbak (which contains only commented examples), hoping that vagrant would reconfigure that file properly... but it doesn't, and the error is still there.

How can I force vagrant to regenerate that file or fix it? Thanks.

like image 327
Louis-Rémi Avatar asked Sep 29 '12 09:09

Louis-Rémi


1 Answers

Just delete the file.

sudo rm -f /etc/exports

The file will be recreated during the vagrant up process.

like image 118
budda Avatar answered Oct 21 '22 20:10

budda