无法使用nfs挂载流浪汉同步文件夹 [英] Cannot mount vagrant synced folder with nfs
本文介绍了无法使用nfs挂载流浪汉同步文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我设法在一个ubuntu流浪者盒子中设置了我的Symfony2项目.但是,通过网站的网络服务器加载网站大约需要20秒钟的时间.经过一番研究,我想出了对同步文件夹使用nfs的方法.这是我在Vagrantfile中的设置:
I managed to setting up my Symfony2 project inside a ubuntu vagrant box. But it takes around 20 seconds to load the website through it's webserver. After some research, i came up with using nfs for the sync folder. Here're my setting from Vagrantfile:
config.vm.network "private_network", ip: "192.168.56.101"
config.vm.synced_folder ".", "/vagrant", :nfs => true, :mount_options => ["dmode=777","fmode=777"]
启动无家可归者"框后,出现以下错误
After starting de vagrant box i get the following error
==> 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似乎可以运行,但是同步的文件夹显然是空的.我怎么了?
The VM seems to work, but the synced folder's obviously empty. What did i wrong?
我的设置:
- 流浪者1.6.5& Virtualbox 4.3.18
- 主机:OS X 10.10
- 来宾:Ubuntu 12.04
推荐答案
在这里 https://找到解决问题的方法github.com/mitchellh/vagrant/issues/2546
流浪者1.3到1.6版本的正确语法是:
The correct syntax for vagrant version 1.3 to 1.6 is:
config.vm.synced_folder ".", "/vagrant", :nfs => { :mount_options => ["dmode=777","fmode=777"] }
这篇关于无法使用nfs挂载流浪汉同步文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文