如何阻止 VMware / Vagrant 尝试创建 NFS 共享?

如何阻止 VMware / Vagrant 尝试创建 NFS 共享?

我正在尝试使用 VMware 而不是 VirtualBox 来运行我的虚拟机。主机:Windows10,客户机:CentOS7。我正在使用 PuPHPet 创建所需的 vagrant 文件,但无论我选择哪个文件系统,默认、NFS、SMB 或 RSync vagrant up 总是尝试挂载 NFS 共享文件夹并失败。我相信 Windows 不支持 NFS,所以它失败并不让我感到惊讶,但我找不到禁用此功能的方法。在我的 Vagrant 文件中,我添加了:

Vagrant.configure('2') do |config|
  eval File.read("#{dir}/puphpet/vagrant/Vagrantfile-#{data['target']}")
  config.vm.synced_folder ".", "/vagrant"
  config.vm.synced_folder "B:\\Web\\www.example.com\\public_html", "/home/example/public_html", type: "rsync"
end

这将挂载并同步文件夹,我以为这将消除挂载 NFS 共享的需要,但之后我仍然得到:

==> example: Rsyncing folder: /cygdrive/b/Web/www.example.com/public_html/ => /home/example/public_html
==> example: Exporting NFS shared folders...
==> example: Preparing to edit nfs mounting file.
==> example: 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,vers=3,udp,nolock 192.168.246.1:/B/Web/www.example.com /vagrant

Stdout from the command:



Stderr from the command:

mount.nfs: Connection refused

我不确定为什么会引用 IP 192.168.246.1,因为它不在我搜索过的任何配置文件中。

相关内容