Closed bgruszka closed 6 years ago
No bug. Do what the plugin says (via cmd with administrator privileges):
Execute the following comands as administartor:
netsh advfirewall firewall add rule name="VagrantWinNFSd-1.0.7" dir="in" action=allow protocol=any program="C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.7\bin\winnfsd.exe" profile=any
netsh advfirewall firewall add rule name="VagrantWinNFSd-1.0.7" dir="out" action=allow protocol=any program="C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.7\bin\winnfsd.exe" profile=any
Unfortunatelly Windows XP has not netsh advfirewall.
http://technet.microsoft.com/pl-pl/library/dd734783%28v=ws.10%29.aspx
Ok that's bad. So maybe you can figure out how to set a firewall rule in Windows XP, because I have currently no Windows XP running and share the command here. Than I can adjust the plugin.
Does the following work:
netsh firewall add rule name="VagrantWinNFSd-1.0.7" dir="in" action=allow protocol=any program="C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.7\bin\winnfsd.exe" profile=any
netsh firewall add rule name="VagrantWinNFSd-1.0.7" dir="out" action=allow protocol=any program="C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.7\bin\winnfsd.exe" profile=any
This command is correct for XP:
C:\Documents and Settings\bgruszka>netsh firewall add allowedprogram "C:\Documen
ts and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.7\bin\winnfsd.
exe" VagrantWinNFSd-1.0.7 ENABLE
And you don't need to define an in and out rule?
There is second option: netsh firewall add portopening
add portopening TCP 80 MojPortWeb
add portopening UDP 500 IKE ENABLE ALL
add portopening ALL 53 DNS ENABLE CUSTOM
157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
add portopening protocol = TCP port = 80 name = MyWebPort
add portopening protocol = UDP port = 500 name = IKE mode = ENABLE scope =
ALL
add portopening protocol = ALL port = 53 name = DNS mode = ENABLE
scope = CUSTOM addresses =
157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
Add windows xp setting hint to new version. Thanks @bgruszka for your help.
After vagrant up (with type: "nfs" in config) vagrant returned:
It seems that you don't have the privileges to change the firewall rules. NFS will not work without that firewall
changes. Execute the following commands via cmd as administrator:
netsh advfirewall firewall add rule name="VagrantWinNFSd-1.0.8" dir="in" action=allow protocol=any program="C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.8\bin\winnfsd.exe" profile=any
netsh advfirewall firewall add rule name="VagrantWinNFSd-1.0.8" dir="out" action=allow protocol=any program="C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.8\bin\winnfsd.exe" profile=any
If you are an Windows XP user run the following command instead:
netsh firewall add allowedprogram "C:\Documents and Settings\bgruszka\.vagrant.d\gems\gems\vagrant-winnfsd-1.0.8\bin\winnfsd.exe" VagrantWinNFSd-1.0.8 ENABLE
==> infor-www: Attempting graceful shutdown of VM...
==> infor-www: Clearing any previously set forwarded ports...
The synced folder type 'nfs' is reporting as unusable for
your current setup. Please verify you have all the proper
prerequisites for using this shared folder type and try again.
Could you provide your vagrant file?
Here it is:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.vm.define "info-www" do |node|
node.vm.network "private_network", ip: "192.168.33.10"
end
# 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.
config.vm.synced_folder "hiro", "/w/inne/info/hiro", type: "nfs"
# config.vm.provider "virtualbox" do |vb|
# # Use VBoxManage to customize the VM. For example to change memory:
# vb.customize ["modifyvm", :id, "--memory", "1024"]
# end
config.vm.provision "shell", path: "provision.sh"
end
@bgruszka could you try it again with the latest version?
I upgraded to the latest verision but with same results:
bgruszka@1968-74-157 /d/workspace/fobos-dev-tools (master)
$ vagrant plugin list
vagrant-hostmanager (1.5.0)
vagrant-login (1.0.1, system)
vagrant-share (1.1.0, system)
vagrant-winnfsd (1.0.9)
bgruszka@1968-74-157 /d/workspace/fobos-dev-tools (master)
$ vagrant up
Bringing machine 'vagrant' up with 'virtualbox' provider...
==> vagrant: Importing base box 'precise32'...
==> vagrant: Matching MAC address for NAT networking...
==> vagrant: Setting the name of the VM: fobos-dev-tools_vagrant_1403896624453_6
8441
==> vagrant: Clearing any previously set forwarded ports...
The synced folder type 'nfs' is reporting as unusable for
your current setup. Please verify you have all the proper
prerequisites for using this shared folder type and try again.
bgruszka@1968-74-157 /d/workspace/fobos-dev-tools (master)
$
One more hint: I tried to run winnfsd.exe but I got "winnfsd.exe is not a valid Win32 application" - is this file compiled for 64 bits? (I have 32bits)
The file (winnfsd.exe) from this site is ok: http://sourceforge.net/projects/winnfsd/
Sorry, won't fix for windows xp.