Skip to content
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

Option for NFS is not silently ignored on windows hosts #1748

Closed
thasmo opened this issue May 19, 2013 · 5 comments
Closed

Option for NFS is not silently ignored on windows hosts #1748

thasmo opened this issue May 19, 2013 · 5 comments

Comments

@thasmo
Copy link

thasmo commented May 19, 2013

Configuring a synced folder with the NFS option, when booting the box an error comes up:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* It appears your machine doesn't support NFS, or there is not an
adapter to enable NFS on this machine for Vagrant. Please verify
that `nfsd` is installed on your machine, and try again. If you're
on Windows, NFS isn't supported. If the problem persists, please
contact Vagrant support.

Shouldn't vagrant just ignore this and boot the VM anyway?

At least I think it would be nice, because otherwise I'd have to
put some logic inside the Vagrantfile to decide whether NFS is
supported or not and set the flag accordingly.

@hwartig
Copy link

hwartig commented May 25, 2013

I guess you could just use the Vagrant::Util::Platform class to configure platform specific behaviour.

config.vm.synced_folder "../data", "/vdata", disabled: Vagrant::Util::Platform.windows?

This would have the advantage that your intention is clearly documented in the Vagrantfile. When vagrant just silently ignores not supported configurations you would have to check for the existence of that shared folder at a later point in time which might be less obvious to new users. Also it might take the machine quite a while to boot up the first time just to fail then on some missing files from the shared folder. Therefore I think its better in this case to fail fast on missing requirements.

@thasmo
Copy link
Author

thasmo commented May 25, 2013

The shared folders aren't limited to NFS only, so they should work on Windows too. The point is that NFS should get ignored on Windows: http://docs.vagrantup.com/v2/synced-folders/nfs.html At least I thought it would ignore it instead of throwing an error.

@hwartig
Copy link

hwartig commented May 25, 2013

Doh! your right. I got send here through codetriage.com and skipped the ever so important RTFM first step.

@thasmo
Copy link
Author

thasmo commented May 25, 2013

Thanks for providing a patch. I've read that for some Windows versions like Windows 7 Ultimate (I think) NFS can be enabled. Not sure if it makes sense to adapt the patch for detecting NFS support somehow and not just disabling for Windows in general.

@mitchellh
Copy link
Contributor

Fixed. Yeah!

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants