sch*_*enk 10 macos nfs shared-directory vagrant ubuntu-12.04
我设法在一个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"]
Run Code Online (Sandbox Code Playgroud)
启动de vagrant box后,我收到以下错误
==> 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
Run Code Online (Sandbox Code Playgroud)
VM似乎工作,但同步文件夹显然是空的.我错了什么?
我的设置:
sch*_*enk 20
在这里找到问题的解决方案https://github.com/mitchellh/vagrant/issues/2546
vagrant版本1.3到1.6的正确语法是:
config.vm.synced_folder ".", "/vagrant", :nfs => { :mount_options => ["dmode=777","fmode=777"] }
Run Code Online (Sandbox Code Playgroud)