Which type should be used to force /vagrant to use VMware for the default synced folder?

188 views
Skip to first unread message

Michael Vermaes

unread,
Sep 19, 2016, 1:27:51 AM9/19/16
to Vagrant
When setting up the CentOS 7 box from https://atlas.hashicorp.com/centos/boxes/7 with the VMware Fusion provider, /vagrant is always shared using the rsync method. Is there a way to override this using the Vagrantfile? I've tried the following:

- Setting different values for the 'type' of the synced_folder, such as vmware/vmware_fusion/vmware_desktop, but this generates an error on reload:
...
==> default: Verifying vmnet devices are healthy...
.../.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.11/lib/vagrant-vmware-fusion/synced_folder.rb:10:in `usable?': wrong number of arguments (2 for 1) (ArgumentError)
...


- Setting the folder with id: "vagrant-root" to disabled, and then redefining it on a new line. This is ignored, and rsync is still used.

- Defining a second synced_folder with a different guest path (/vagrant2). This works.

Given the last point, I believe VMware Tools are set up correctly. The Tools were configured by installing open-vm-tools from CentOS repositorities and then adding the tools from the Fusion iso to get shared folder support.

Other version details:
- OS X 10.11.6
- VMware Fusion 8.5 (same behaviour with 8.1.1)
- Vagrant 1.8.5
- vagrant-vmware-fusion 4.0.11

Thanks for any suggestions anyone can provide.

Michael Vermaes

unread,
Sep 19, 2016, 1:41:41 AM9/19/16
to Vagrant
Actually, using type: "vmware_desktop" or "vmware_fusion" results in:

/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/mixin_synced_folders.rb:137:in `block in synced_folders': Internal error. Report this as a bug. Invalid: vmware_desktop (RuntimeError)

which is the same message as when specifying random text for the type, so I believe vmware is the correct value. I'm not sure why it doesn't work though. Here is my Vagrantfile:

Vagrant.configure("2") do |config|
  config
.vm.box = "centos/7"

 
# Disable the default rsync sync method:
  config
.vm.synced_folder "./", "/vagrant", id: "vagrant-root", disabled: true
 
# This just enables the folder using rsync again:
  config
.vm.synced_folder "./", "/vagrant"
 
 
# This (exporting a different location in the guest) syncs the folder using VMware:
  config
.vm.synced_folder "./", "/vagrant2"
 
  config
.ssh.insert_key = false
end

Alvaro Miranda Aguilera

unread,
Sep 19, 2016, 12:56:53 PM9/19/16
to vagra...@googlegroups.com
hello

for some vm in atlas some vendor/people choose not to install guest additions and use rsync

check a vagrant file ~/,vagrant.d/boxes/centos-VAGRANTSLASH-7

you will see the code that disable the folder and enable rsync

i will suggest other vm first to ensure all is right



--
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 vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/bc85b54b-8845-4303-b210-199fadc5e246%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Michael Vermaes

unread,
Sep 19, 2016, 11:08:06 PM9/19/16
to vagra...@googlegroups.com
Ah great, that looks like the file I was looking for. I will try repackaging the box with a Vagrantfile that doesn't specify rsync and see how I go. Thanks for pointing me in the right direction.

You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/cRCqsKmgMAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exa0FgzYSm9kZhWuUDZcWQJo51UiToocdyskVBAkCW2iA%40mail.gmail.com.

Alvaro Miranda Aguilera

unread,
Sep 20, 2016, 3:59:19 AM9/20/16
to vagra...@googlegroups.com
Hello

Just make sure you install Virtualbox Guest additions before.

Also, in the intermediate box, is good to add config.ssh.insert_key = false so Vagrant doesn't replace the insecure one.

Alvaro


For more options, visit https://groups.google.com/d/optout.



--

Michael Vermaes

unread,
Sep 20, 2016, 5:34:11 AM9/20/16
to vagra...@googlegroups.com
Well, VMware Tools in this case :) But yes, that's the plan.

I'm including insert_key = false in our Vagrantfiles currently, but
I'd like to remove that again once 1.8.6 is available with
https://github.com/mitchellh/vagrant/pull/7611. These boxes are only
used privately, so we prefer to have the key replaced.

Thanks again for your advice.

On Tue, Sep 20, 2016 at 3:59 PM, Alvaro Miranda Aguilera
>>>> an email to vagrant-up+...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/vagrant-up/bc85b54b-8845-4303-b210-199fadc5e246%40googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>>
>>> --
>>> Alvaro
>>> (+31)103400555
>>>
>>> --
>>> 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 a topic in the
>>> Google Groups "Vagrant" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/vagrant-up/cRCqsKmgMAs/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> vagrant-up+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/vagrant-up/CAHqq0exa0FgzYSm9kZhWuUDZcWQJo51UiToocdyskVBAkCW2iA%40mail.gmail.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> 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 vagrant-up+...@googlegroups.com.
> --
> 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 a topic in the
> Google Groups "Vagrant" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/vagrant-up/cRCqsKmgMAs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/CAHqq0exqkpKPKGyf99x9LR3rEyF_Z5U9LvqbzV%3Dg%2BdWAe5u5Jg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages