我有以下流浪脚本:
Vagrant.configure(2) do |config|
config.vm.box = "puppetlabs/debian-8.2-64-puppet"
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 1
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update && install nfs-common portmap
apt-get install -y puppet
puppet module install puppetlabs/stdlib
SHELL
config.vm.provision "puppet" do |puppet|
puppet.manifest_file = "default.pp"
puppet.manifests_path = ".vagrant/puppet"
puppet.module_path = ".vagrant/puppet/modules"
end
config.vm.synced_folder "./", "/var/www", :nfs => true
end
当我启用 NFS(我需要它,因为默认共享文件夹会导致另一个程序出现问题)时,我收到以下错误:
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-kernel-server.service - LSB: Kernel NFS server support
Loaded: loaded (/etc/init.d/nfs-kernel-server)
Active: active (exited) since Mon 2016-07-25 14:13:11 CDT; 17h ago
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
set -e
mkdir -p /var/www
mount -o vers=3,udp 172.28.128.1:/home/alex/Projects/chrome /var/www
if command -v /sbin/init && /sbin/init --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/var/www
fi
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported
我以我自己和具有提升权限的“sudo”用户身份通过 IDE 和 CLI 运行了此脚本 - 仍然是相同的结果。
有任何想法吗?