我设法在一个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 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
虚拟机似乎有效,但同步文件夹显然是空的。我错了什么?
我的设置:
答案 0 :(得分: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"] }