我试图在启用nfs的Ubuntu主机中运行迷航器,但当我尝试运行迷航器时,它会出现错误。这些是我的规格:
这是我的流浪档案:
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "vagrant-play"
config.vm.provider "virtualbox" do |v|
v.name = "eng-soft-project"
# max 75% CPU cap
v.customize ["modifyvm", :id, "--cpuexecutioncap", "75"]
# give vm max 3GB ram
v.memory = 2048
end
config.vm.provision :shell, :privileged => false, :path => "vagrant-machine-setup.sh"
config.vm.provision :shell, :privileged => false, :path => "vagrant-machine-run.sh",run: "always"
forward_port = ->(guest, host = guest) do
config.vm.network :forwarded_port,
guest: guest,
host: host,
auto_correct: true
end
forward_port[9000] # activator run
forward_port[8888] # activator ui
forward_port[9999] # unknow
config.vm.network :private_network, ip: "192.168.50.50"
config.vm.synced_folder "source-code/", "/home/vagrant/source-code", type: "nfs", create: true, mount_options: ["dmode=755,fmode=755"]
config.vm.synced_folder "teste/", "/home/vagrant/teste", type: "nfs", create: true, mount_options: ["dmode=755,fmode=755"]
end这是一个错误:
nfsd running
exportfs: <home-path>/project/teste does not support NFS export
exportfs: <home-path>/project/source-code does not support NFS export
==> 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=755,fmode=755' 192.168.50.1:'<home-path>/project/source-code' /home/vagrant/source-code
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: an incorrect mount option was specified我尝试了很多可能的解决方案,比如更新我的vb盒版本,安装迷航器-vb来宾插件,在来宾内部建立VBoxGuestAdditions之间的链接。
所有这些都不能解决我的问题,如果有人知道解决方案,请告诉我。
发布于 2015-10-11 08:02:37
安装nfs-kernel-server
sudo apt-get install nfs-kernel-server那就做好准备或者vagrant up
或
您可以通过添加插件vagrant-nfs_guest来尝试
vagrant plugin install vagrant-nfs_guest还要检查系统的防火墙,这些防火墙可能会阻塞NFS和rpcbind端口。
https://stackoverflow.com/questions/33060689
复制相似问题