Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

NFS Seems to be the default for the first shared folder if native is tried to be used. #1202

Closed
generalredneck opened this issue Mar 8, 2017 · 12 comments

Comments

@generalredneck
Copy link

generalredneck commented Mar 8, 2017

`: -->

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.9.1
VirtualBox 5.0.32r112930
bash: ansible: command not found

Your OS

  • Windows
    $ systeminfo | grep "^OS [Name|Version]"
    OS Name:                   Microsoft Windows 10 Pro
    OS Version:                10.0.14393 N/A Build 14393   
    

Full console output

Summary

When using drupal-vm as a composer dependency, if I switch type: nfs to be type: "", it doesn't seem to make a difference. I believe this is because what ever is in ./vendor/geerlingguy/drupal-vm/default.config.yml is over loading what is in type. To prove this I put just a random string in type in config.yml to show it only happens when type is empty or an empty string. This probably has something to do with the merge properties algorithm located here.

This was found during an upgrade from Vagrant 1.8.1 to Vagrant 1.9.1 where it seems that NFS has been explicitly banned from Windows in the mean time... Before it looks like they automagically set it to "shared" instead and I just didn't know any better :)

@geerlingguy
Copy link
Owner

Interesting... I remember having tested this specifically a few releases ago at least on macOS 10.11 and Windows 10. Can you try upgrading to Vagrant 1.9.2 and see if that works? Or try Vagrant 1.9.0 and see if that works?

There were a lot of issues with NFS shares in 1.9.1... on Mac, Windows, and even Linux hosts.

@generalredneck
Copy link
Author

You know I think about it... and my logic is flawed... also we can't garentee that Virtualbox's shared folders will be used with "" as the type am I right? So it could be that NFS was what was selected as my default.

type (string) - The type of synced folder. If this is not specified, Vagrant will automatically choose the best synced folder option for your environment. Otherwise, you can specify a specific type such as "nfs".

https://www.vagrantup.com/docs/synced-folders/basic_usage.html

With that said, I upgraded to 1.9.2 and then started having issues with a different error message... which has nothing to do with what I've reported here obviously...

saying

mount -t vboxsf -o uid=900,gid=900 vagrant /vagrant

The error output from the command was:

: No such file or directory.

needless to say I didn't get my VMs back up and working on Windows and gave up when I found documentation that says that there is no support for Windows NFS (besides that one vagrant plugin).

The easy way would be to see if there is some way to var_dump that config and see it actually does contain the correct settings when we set type: "" in config.yml. I should do some googling and figure out how and see for myself, but if you do before me... 👍

@geerlingguy
Copy link
Owner

I can't right now, unfortunately... but as a short term workaround, would type: "smb" work for you? That's what I normally use on my Windows 10 builds.

@geerlingguy
Copy link
Owner

(Or rsync if I have a need for speed)

@generalredneck
Copy link
Author

SMB unfortunatly doesnt' support symlinking... shared folders I know do... and actually aren't Thaaaaaat bad... which is why I was fairly happy with them. The downside of rsync going only 1 way blows too unfortunately when you got files being built by the webserver if I recall... I do appreciate the suggestions though.

Lastly, don't break you neck over this... Windows Dev has been a masochistic hobby of mine and this is one of the pain points :P. I use Mac for my day job, so life is still good!

@geerlingguy
Copy link
Owner

SMB does, as long as you run whatever terminal you're using to run vagrant commands as administrator, and as long as all the symlinks are generated within a linuxy environment (e.g. do all the work inside the VM, or inside cygwin or cmder or Ubuntu Bash...).

For rsync, there's also two-way rsync plugins, and some people end up doing a reverse-SMB mount, or something like that.

But in general, yeah, I want to make sure that "" works and allows you to use whatever the native share is.

@generalredneck
Copy link
Author

So here's something... It appears that

mount -t vboxsf -o uid=900,gid=900 vagrant /vagrant

The error output from the command was:

: No such file or directory.

is something up with the latest virtualbox install for me... I downgraded to 5.1.4 and all was well.

As for the original problem reported... It appears that I was incorrect. Doing a dump gave me the correct properties I expected (type:"") so we can close this. This was just one big bucket of weirdness...

@geerlingguy
Copy link
Owner

@generalredneck - Oh gosh, I completely missed that you were on 5.0.x—yeah, there were a few annoying bugs occurring with new Vagrant versions on VirtualBox 5.0.x, so I bumped that requirement recently to 5.1.x (I think 5.1.16 just came out too).

@generalredneck
Copy link
Author

Yeah I upgraded to 5.1.16 and that's when I started having the mount problem... so I reigned it in to an older 5.1 version

@geerlingguy
Copy link
Owner

Oh, ha, okay. Then it's good to know 5.1.16 may have introduced new fun issues.

Also make sure to always install vagrant plugin install vagrant-vbguest—that can sometimes head off these issues if your version of VirtualBox is the latest but boxes were built on an older release.

@generalredneck
Copy link
Author

good to know!

@geerlingguy
Copy link
Owner

@generalredneck - I'm fairly certain it's VirtualBox 5.1.16 that's causing all this insanity; check out #1210

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants