New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mounting problem on Windows 8.1 #12
Comments
Disable your firewall and check if the winnfsd process is running. |
I've disabled Windows Firewall and checked task manager ... winnfsd.exe (32bit) running. But the error is the same |
You could login to your box and try to run the command
|
Oh I forgot to specify what I use: Vagrant 1.6.3 and VirtualBox 4.3.12 r93733 Host Machine: Windows 8.1 Pro x64 |
Could you search for the batch file
to
That will keep the window for the nfs daemon open and we can see what happens. |
I did that, modified my VagrantFile
and launched The process freezes on
|
@borisschapira And than you get a timeout? |
@GM-Alex Nope, nothing. I tried to relaunch, same issue. 4 minutes waiting, still counting. |
Could you try to switch the logging on as suggested above and post the output? Do you have the firewall rules set up correctly? |
And then I got the same message than @billmn 10 days ago. |
Oh there was a |
Ok, so let's try again :
Response :
|
I forgot to write it by playing with the parameters did not work either. |
Could you please update to version 1.0.8, turn on the logging of the module as described in the readme and paste the output of the winnfsd daemon window. |
I've updated ton version 1.0.8 and added to my VagrantFile
How can I display the winnfsd daemon window ? A |
I looked inside the nfsservice.bat and I think there is an issue.
(my system is in french, "était inattendu" means "unexpected") I did not understand the message, si I played with the script, echoing
Output :
As you can see, my
And the output was :
So I think I've nailed an issue, haven't I ? |
I think that you should put
|
With the modification above, the Mounting do not freeze anymore and the NFS daemon window is launched. |
The nfsservice.bat did not worked well without quotes on both sides of the |
With the file contributed as above, I changed my config to
My
Isn't that very good |
Now that I've managed to host a CentOS, I'm trying to host an Ubuntu 12.03 on Windows 8.1. Here is my VagrantFile Synced folders :
I've got the already known issue on
So I connected directly to the VM and tried to run the mounting command myself, here is the response : vagrant@gsoi:~$ sudo mount -o 'vers=3,nolock' 10.0.0.1:'/C/www/projects/project1' /var/www/html/project1 --verbose
mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Thu Jun 26 10:06:02 2014
mount.nfs: trying text-based options 'vers=3,nolock,addr=10.0.0.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.0.0.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.0.0.1 prog 100005 vers 3 prot UDP port 1058
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 10.0.0.1:/C/www/projects/project1 And when I look the winnfsd daemon, I see a list of all known pathes (including the two above) and then :
So it seems the first Synced Folder is correctly mounted and there's an issue on the second folder to sync. Am I right ? |
New release online. Should be fixed now. @borisschapira Thanks again for your help. |
@GM-Alex Thank you ! |
I still have the issue described above but I am not able to tell if the issue is Windows-related or related to the special multi-project configuration that I have. If you want to test it, here is a complete Vagrant install to test : https://www.dropbox.com/s/dvxb8l47uaagyms/vagrantTest.zip |
I have the same issue - two synced folders, one of which is handled correctly while the other returns an "access denied by server" error. |
@GM-Alex Maybe you should reopen the issue, or make a new one for that "multiple folders" thing... ## First folder, correctly managed
config.vm.synced_folder "salt/roots/", "/srv/", :nfs => nfs_setting
## Other folders, error
if Dir.exists?('projects/mawDevs/')
config.vm.synced_folder "projects/mawDevs/", "/var/www/maw/", :nfs => nfs_setting
end (extracted from https://github.com/MakeAWish/mawVagrant/blob/master/Vagrantfile) |
I've set the compatibility mode. It seems to work nicely for a "one-project" vagrant but as usual, on a multi-project vagrant (as described in june #12 (comment)), that does not work |
I am also on Windows 8.1. Even after setting the compatibility mode to Windows 8 I can't get to run more than two machines with an nfs share simultaneously. If I'm about to start the third machine and I previously kill winnfsd.exe, the folder will mount but, obviously, I will loose the previous two mountpoints of the machines opened previously. If I then go and vagrant reload the previous two machines, no matter what I do I always end up with a maximum of two nfs working machines. The third one never gets to mount. Does anybody else have this same issue where they cannot start more than two machines with an nfs share? |
@pinano As already mentioned, I cannot mount multiple folders, whether they're on the same or different hosts. |
@borisschapira the funny thing is that I can mount up to two folders, whether it is on the same project or in two different projects, but I cannot get to mount the third one. It feels as if it was a limitation of winnfsd somehow, although it doesn't make much sense to me... |
@pinano Hum, you're right, it seems that I have the same issue, with two folders but no more. What's funny is that when the log is activated with :
the third folder appears in the logged NFS requests... same behaviour on your install ? |
I'm having the same problem when using dduportal/boot2docker. WinNFSd window was printing I found a RFC about the port mapping which says that the correct procedure is So at least in my case it's something to do with the box itself. At least SMB shares are working with dduportal/boot2docker so I'll stick with that for now. |
@borisschapira What happens in my install, once I have been examining the logs, is that it mounts the first folder, then it mounts the second folder, and when I I am pasting a piece of the I have also inserted some comments where something relevant is going on:
@nakanaa The boxes I'm using are all Ubuntu 14.04. Do you suggest switching to Debian to see if the behaviour is any different? |
After some extensive testing, I believe this is a fault with the winnfsd service. vagrant-winnfsd itself isn't to blame, but could be modified to help avoid this problem. When requesting a mount, winnfsd appears to be comparing the length of the alias, and then comparing the content. If an alias of greater length comes first, it is incorrectly matched as the "final local requested path". For instance, this works just fine (some stuff omitted):
But in the following, a request for /www will result in a match to to /t33st, because it is of greater length and comes first.
Additionally, vagrant-winnfsd leaves the winnfsd service running when the vagrant instance is halted. The end result is a mis-matching alias map, causing all sorts of weird issues that make absolutely no sense. To fix this, simply kill the winnfsd instance if you make any modifications to your shares. In short, the workarounds are:
Because of this, it would be an enhancement if:
Failing that, someone should go fix winnfsd. I debugged this in Windows 8.1, turning on logging manually in nfsservice.bat. |
@dave-newson thanks for this deep debugging, I will try that ASAP ! |
@dave-newson I confirm everything you said, now it works. I've find another temporary solution : declare all my sync folders in an array and reorder the array in length-ascending order before declaring them to vagrant for synchronization : https://github.com/borisschapira/vagrant-template/blob/master/Vagrantfile#L62 Thanks a lot, again. |
Will this be included into the core? :) |
@dave-newson thanks a lot it works, i just rearranged my shared folder in my homestead.yaml in ascending order according to length and everything work fine Thanks a lot for all who contributed in this post, specially @borisschapira and plugin author ofcourse |
@borisschapira Thanks for the fix. Your fix works with my setup for multiple folder sharing in windows 8.1 |
Thanks @dave-newson. Hopefully this gets fixed so I don't have to sort my sync folders list. |
running with win8 compatibility worked for me. weird. |
For anyone having problems with Laravel Homestead and a Windows host, I've made this Gist here: https://gist.github.com/prograhammer/9493ee04f30dd74e121b |
I still have this issue on win 8.1 is there any generic solution so far? |
@vaske see my comment on 12 Mar : #12 (comment) You must put your sync folders in alpha/length order. I propose a way to do it in https://github.com/borisschapira/vagrant-template/blob/master/Vagrantfile, L15 to L62. |
The quick fix for me that works fine
It works fine after doing this, like dave-newson said, it does not stop the winnfsd.exe when you do a vagrant halt, so I just stop it manually. I never had to do anything with sync folders. |
@borisschapira Must the shares be ordered by the host path or the guest path? Also, if using relative paths, must the expanded path be sorted, or just the relative portion? If this is a bug in the plugin, is there a dedicated ticket for it somewhere. There are handful of issues related to shared not working but they all have a very large amount of similar comments with no apparent resolution so it's hard to even tell which issues are really for what in this repo. |
@bdw429s Host path ("from" : https://github.com/borisschapira/vagrant-template/blob/master/Vagrantfile#L62). I don't understand you relative vs. expanded path question. If the relative path are sorted, the expanded are too because they share the same root... |
I've just changed actimeo=1 to nolock,vers=3,udp and set compatibility to w8. It works like a charm! I'm using Windows 10 64 bit. |
Cool. Really cool Le sam. 26 sept. 2015 16:28, Talha Zekeriya Durmuş notifications@github.com
|
I have struggled for few hours with vagrant freezes on "default: Mounting NFS shared folders". Hope this will save some time for others. |
@amirbilu hit the same problem. tcp port 1058 is taken by windows "Policy Agent" service. This service is related to IPSec. |
Dear googler's: For anyone having issues with vagrant freezing on the @dave-newson's fix above works for me (#12 (comment)) in at least allowing me to mount one of my shares as NFS. The remaining shares cannot be mounted. In my case: config.vm.synced_folder "../websites", "/websites", type: 'nfs' # Shorter alias (second param)
config.vm.synced_folder ".", "/etc/puppet", id: "vagrant-root" # Will not mount as 'nfs'. Where |
I had issues with the winnfsd process not ending on vagrant-destroy and trying to launch another machine. I found this work around to be very helpful, it implements vagrant triggers. In vagrantfile... config.trigger.after :destroy do |
I needed to allow winnfsd.exe in my Vipre firewall at |
I'm using Laravel Homestead box ( http://laravel.com/docs/homestead ) and your awesome plugin to allow NFS on WIndows 8.1 Pro but I have some problem on mounting folders.
I've changed this line to force to use NFS on Windows https://github.com/laravel/homestead/blob/master/scripts/homestead.rb#L45
But when I run "vagrant up" I see this:

Thoughts?
The text was updated successfully, but these errors were encountered: