This is a variation on what you are attempting to do, as you can see 
automount: true is there:

remote.vm.synced_folder itm["src"], itm["dest"],
    id: itm["src"].match(/[^\/]*$/)[0] + "-#{index}",
    create: true,
    automount: true,
    type: "nfs",
    mount_options: ['rw', 'vers=3', 'tcp'],
    linux__nfs_options: ['rw','no_subtree_check','all_squash','async']


>From what I can see, you are doing it correctly. 



On Wednesday, November 6, 2019 at 9:08:59 AM UTC-5, Ed Greenberg wrote:
>
> Host is Windows 10 and guest vagrant box is Centos/7 
>
> I have these lines in my vagrantfile:
>
>     rackspace_config.vm.synced_folder USER_DIR + "/www"   , 
> "/var/www/html/"     , type: "virtualbox"
>     rackspace_config.vm.synced_folder USER_DIR + "/home"  , 
> "/var/www/html/home" , type: "virtualbox"
>
> When I start the vagrant box, /var/www/html is empty.   The shared folder 
> is available, and shows up in the virtualbox console but that does not show 
> the automount box as checked.
>
> If I do this, the contents of USER_DIR/www appears:
>
>  sudo mount -t vboxsf var_www_html_ /var/www/html
>
> I read that an automount option is required.  I'm not sure how to specify 
> this in the vagrant file  I tried this:
>
>     rackspace_config.vm.synced_folder USER_DIR + "/www"   , 
> "/var/www/html/"     , type: "virtualbox", automount: true
>
> which I realize is a total stab in the dark, but the documentation is 
> silent on the subject.  It didn't change anything. 
>
> Can somebody tell me what the correct syntax is to add the automount 
> option to the ...vm.synced_folder line? 
>
> Thanks, 
> Ed Greenberg
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/fbe243c3-f6cb-43c3-a100-efab498aedcf%40googlegroups.com.

Reply via email to