osx – 无法挂载带有nfs的vagrant同步文件夹

前端之家收集整理的这篇文章主要介绍了osx – 无法挂载带有nfs的vagrant同步文件夹前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我设法在ubuntu流氓盒子里安装了我的Symfony2项目.但是通过它的网络服务器来加载网站需要20秒左右的时间.经过一番研究,我想出了使用nfs的同步文件夹.这是我从Vagrantfile的设置:
config.vm.network "private_network",ip: "192.168.56.101"
config.vm.synced_folder ".","/vagrant",:nfs => true,:mount_options => ["dmode=777","fmode=777"]

启动de vagrant盒后,我得到以下错误

==> 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 'dmode=777,fmode=777' 192.168.56.1:'/Users/marcschenk/Projects/teleboy.ch' /vagrant

Stdout from the command:

Stderr from the command:

stdin: is not a tty
mount.nfs: an incorrect mount option was specified

VM似乎工作,但同步的文件夹显然是空的.我错了什么?

我的设置:

> Vagrant 1.6.5& VirtualBox 4.3.18
>主机:OS X 10.10
> Guest:Ubuntu 12.04

解决方法

找到解决问题的这个 https://github.com/mitchellh/vagrant/issues/2546

vagrant版本1.3到1.6的正确语法是:

config.vm.synced_folder ".",:nfs => { :mount_options => ["dmode=777","fmode=777"] }
原文链接:https://www.f2er.com/linux/393637.html

猜你在找的Linux相关文章