问题
When I attempt to initiate 'vagrant up' the script executes as normal until it gets to the last line, where NFS shared drives are mounted.
I have tried deleting the exports file in /etc/ followed by a nfsd restart and vagrant destroy / vagrant up but to no avail.
After some considerable amount of time the console outputs the following [certain details redacted]:
*==> default: Mounting NFS shared folders...*
*The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!*
*mount -o 'nolock,vers=3,udp,noatime' XXX.XXX.XX.X:'/Users/dhatton/Google Drive/moodle-doodle/site' /var/www/site*
*Stdout from the command:*
*Stderr from the command:*
*mount.nfs: Connection timed out*
UPDATE
The above problem was encountered when using a VPN into the office network. Upon logging in on-site without the VPN, everything works again.
回答1:
I had similar issue. I searched a lot, and tried following solutions:
- Check
/etc/exports
and/etc/hosts
files, if there are invalid entries in file, remove them. - Check your firewall is not blocking access
- Restart NFS system
- install
vagrant plugin install vagrant-vbguest
plugin - do
vagrant reload --provision
- Reboot your pc
- Reinstall vagrant
For me reinstalling vagrant worked.
回答2:
Assuming you are trying to mount from guest to host (host being OSX?) trying mounting to a different path. You might be encountering issues with the space in Google Drive?
来源:https://stackoverflow.com/questions/33568969/vagrant-up-stuck-on-mount-nfs