【发布时间】:2014-10-27 19:22:47
【问题描述】:
我想用 virtualbox 将一个大项目(5000 个文件)迁移到 vagrant。 众所周知,Virtualbox 共享文件夹对于大型项目来说很慢,所以我想使用 NFS。
但是,我没有找到使用 NFS 代替默认共享文件夹问题的正确方法。当我将代码放在另一个文件夹中并共享它时,它可以工作。但我想将 Vagrant 整合到当前的版本中。
config.vm.synced_folder '.', '/vagrant', nfs: true
不起作用:
exportfs: duplicated export entries:
exportfs: 10.11.12.13:/home/vincent/workspace/gp
exportfs: 10.11.12.13:/home/vincent/workspace/gp
有什么办法可以解决这个奇怪的问题吗?
谢谢。
更新 1
这些参数同样的错误
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/home/vagrant/gp", nfs: true
这是完整的错误堆栈:
nfsd running
exportfs: duplicated export entries:
exportfs: 10.11.12.13:/home/vincent/workspace/gp
exportfs: 10.11.12.13:/home/vincent/workspace/gp
==> default: Mounting NFS shared folders...
Vagrant::Errors::LinuxNFSMountFailed: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o 'vers=3,udp' 10.11.12.1:'/home/vincent/workspace/gp' /home/vagrant/gp
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: access denied by server while mounting 10.11.12.1:/home/vincent/workspace/gp
【问题讨论】:
标签: vagrant vagrantfile