I initially thought that the vagrant-winnfsd
plugin would take care of NFS storage on Windows (meaning I wouldn't have to use haneWIN) but that was a no-go because the error I received was mount.nfs: requested NFS version or transport protocol is not supported
.
After re-activating haneWIN I now receive this error: mount.nfs: mounting 172.28.128.1:/D/git-repositories/+vm failed, reason given by server: No such file or directory
.
I get the impression that the [URL]:[mount] format is incorrect because on another VM I manually set up my mount in fstab with the following: 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
.
Should Vagrant's attempt not look something like 172.28.128.1:/websites
given the following configuration?
Host OS: Windows 7 x64, LAN IP: 192.168.11.2
Guest OS: Ubuntu/trusty64
Virtualizer: Virtualbox 5.0.20 r106931
Relevant Plugins: vagrant-winnfsd
Host OS NFS Server: haneWIN NFS Server
NFS Server Exports:
D:\git-repositories\+vm -name:websites
Vagrantfile excerpt:
# 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
]
My suspicion was correct. vagrant-winnfsd
doesn't let you explicitly set the path after the IP address - it always includes the drive letter in front. My solution was the set the haneWIN NFS server export name to match the drive letter that the Vagrantfile was using.
Keep in mind that Vagrantfile is on drive letter I:\
.
NFS Server Exports: D:\git-repositories\+vm -name:I
Vagrantfile excerpt:
# 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.
#
# Share ruby repository directories
config.vm.synced_folder '.',
'/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
]
The ultimate problem was that either one of these facts didn't play well with the other:
1) haneWIN's exports cannot use forward slashes, which is what winnfsd uses
2) winnfsd always puts the drive letter in front of the path specified (presumably because it's checking that the path exists on the local file system)