我正在尝试更改VagrantFile,以便它使用NFS挂载而不是默认的VirtualBox共享文件夹。
我收到此错误消息:
vm:
* Shared folders that have NFS enabled do not support owner/group
attributes. Host path: .
这是我的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
我看不到任何所有者或群组被设置。
请帮忙!
谢谢
最佳答案
仅当所有者或组为true时,Vagrant才会引发此错误。尝试通过为两个synced_folder配置的这两个选项传递nil来强制使用它。, group: nil, owner: nil
这是代码:
https://github.com/mitchellh/vagrant/blob/8655d212c327d363f8e80185705ff70bb2e97f6b/plugins/kernel_v2/config/vm.rb#L572
关于 Vagrant :无法使NFS工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24876777/