【发布时间】:2014-11-23 12:44:51
【问题描述】:
我的 Vagrantfile 中有以下内容:
config.vm.network :private_network, ip: "10.0.0.103"
config.vm.synced_folder ".", "/vagrant/", type: "nfs"
在新盒子上执行vagrant up 会产生:
==> 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 'vers=3,udp' 10.0.0.1:'/Users/wayne/app' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: access denied by server while mounting 10.0.0.1:/Users/wayne/app
然后我需要 vagrant reload 并且它似乎工作......但我肯定不应该这样做吗?
[更新:日志输出]
INFO retryable: Retryable exception raised: #<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.0.0.1:'/Users/wayne/sonatribe' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported
>
INFO ssh: Execute: mount -o 'vers=3,udp' 10.0.0.1:'/Users/wayne/sonatribe' /vagrant (sudo=true)
INFO retryable: Retryable exception raised: #<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.0.0.1:'/Users/wayne/sonatribe' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported
【问题讨论】:
-
您使用的是哪个操作系统?另外,您说重新加载实际上允许 NFS 工作?
-
主机是 OSX Yosemite,来宾是 XUbuntu,重新加载允许 NFS 工作 - 重新加载时我不需要重新输入密码,但它可以工作
-
执行“VAGRANT_LOG=info vagrant up”并粘贴输出。
-
@Hassan 完成 - 似乎关键是:mount.nfs:不支持请求的 NFS 版本或传输协议
-
降级并将基础映像更改为 LTS Ubuntu(而不是 XUbuntu)似乎可以解决此问题
标签: vagrant nfs vagrantfile