Vagrant:无法让NFS工作

Jam*_*yer 8 virtualbox nfs vagrant vagrantfile

我正在尝试更改我的VagrantFile,以便它使用NFS挂载而不是默认的VirtualBox共享文件夹.

我收到此错误消息:

vm:
* Shared folders that have NFS enabled do not support owner/group
attributes. Host path: .
Run Code Online (Sandbox Code Playgroud)

这是我的VagrantFile:

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
  config.vm.box = "ktbartholomew/lamp"
  config.vm.network "private_network", type: "dhcp"
  config.vm.synced_folder ".", "/vagrant", type: "nfs"
end
Run Code Online (Sandbox Code Playgroud)

我看不到任何所有者或团体被设置.

请帮忙!谢谢

Bij*_*jan 2

Vagrant 仅当所有者或组为 true 时才会引发此错误。尝试通过为两个synced_folder 配置的这两个选项传递 nil 来强制执行它。

, group: nil, owner: nil

这是代码:https ://github.com/mitchellh/vagrant/blob/8655d212c327d363f8e80185705ff70bb2e97f6b/plugins/kernel_v2/config/vm.rb#L572