我最初认为该vagrant-winnfsd
插件会处理 Windows 上的 NFS 存储(这意味着我不必使用 haneWIN)但这是不行的,因为我收到的错误是mount.nfs: requested NFS version or transport protocol is not supported
.
重新激活 haneWIN 后,我现在收到此错误:mount.nfs: mounting 172.28.128.1:/D/git-repositories/+vm failed, reason given by server: No such file or directory
.
我得到的印象是 [URL]:[mount] 格式不正确,因为在另一个 VM 上,我在 fstab 中手动设置了我的挂载,如下所示:192.168.11.2:/websites /home/vagrant/rails nfs nfsvers=3,vers=3,rsize=8192,wsize=8192,timeo=14,auto,intr,udp,nolock,exec,rw,user
.
172.28.128.1:/websites
考虑到以下配置,Vagrant 的尝试是否应该看起来不像?
主机操作系统:Windows 7 x64,局域网 IP:192.168.11.2
来宾操作系统:Ubuntu/trusty64
虚拟机:Virtualbox 5.0.20 r106931
相关插件:vagrant-winnfsd
主机操作系统 NFS 服务器:haneWIN NFS 服务器
NFS 服务器导出:
D:\git-repositories\+vm -name:websites
流浪文件摘录:
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network :private_network, type: :dhcp, auto_config: false
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network :public_network,
ip: '192.168.11.14',
bridge: 'Realtek PCIe GBE Family Controller'
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#
# Do not share root directory of vagrant
config.vm.synced_folder '.', '/vagrant', disabled: true
# Share ruby repository directories
config.vm.synced_folder 'D:/git-repositories/+vm',
'/home/vagrant/apps',
nfs: true,
mount_options: [
'nfsvers=3',
'vers=3',
'actimeo=1',
'rsize=8192',
'wsize=8192',
'timeo=14',
:nolock,
:udp,
:intr,
:user,
:auto,
:exec,
:rw
]