[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#878192: Vagrant/virtualbox: Optionally disable rsync synced_folder if vagrant-vbguest is installed



Package: cloud.debian.org
Severity: wishlist
Tags: newcomer patch

Dear Maintainer,

I would like to propose that you add the following wrapper to the "config.vm.synced_folder" line in 
the Vagrantfile packaged in the debian/squeeze64 (and potentially the other distributed images?)

This would permit people who prefer the vboxfs file system, to use that, if they have the plugin
loaded, but also allows them to overide the option, if that's their preferred sync mechanism. With
the current Vagrantfile shipped with the box, it's not clearly defined how someone prevents the
rsync default from being applied.

   config.vm.base_mac = "decafbad1234"
-  config.vm.synced_folder ".", "/vagrant", type: "rsync"
+
+  unless Vagrant.has_plugin?("vagrant-vbguest")
+    config.vm.synced_folder ".", "/vagrant", type: "rsync"
+  end
+
   config.vm.post_up_message = "......"

I have tested this today with my Vagrant setup, and it works, with both the Jessie and Stretch boxes.

Regards,

-- 
Jon "The Nice Guy" Spriggs

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


Reply to: