gpt4 book ai didi

vagrant - 将 NFS 与 vagrant 一起使用不起作用

转载 作者:行者123 更新时间:2023-12-04 07:37:21 25 4
gpt4 key购买 nike

我的 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

最佳答案

对于 Linux,我在主机上执行此操作:

systemctl stop nfs-kernel-server.service
systemctl disable nfs-kernel-server.service
systemctl enable nfs-kernel-server.service
systemctl start nfs-kernel-server.service

关于vagrant - 将 NFS 与 vagrant 一起使用不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27089090/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com