Sync /vagrant folder using virtualbox shared folder
When doing vagrant halt then vagrant up we want the system to keep working. The easiest way to do this is to use a virtual box plugin to install the tools, then use the tools to sync the /vagrant directory, rather than falling back to rsync on every boot of the VM. The rsync looses all the writes since the last boot, forcing a full reprovision.
This commit is contained in:
5
Vagrantfile
vendored
5
Vagrantfile
vendored
@@ -37,7 +37,10 @@ Vagrant.configure("2") do |config|
|
|||||||
# the path on the host to the actual folder. The second argument is
|
# the path on the host to the actual folder. The second argument is
|
||||||
# the path on the guest to mount the folder. And the optional third
|
# the path on the guest to mount the folder. And the optional third
|
||||||
# argument is a set of non-required options.
|
# argument is a set of non-required options.
|
||||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
|
||||||
|
# NOTE: To make this work install vbguest plugin to install tools in VM:
|
||||||
|
# vagrant plugin install vagrant-vbguest
|
||||||
|
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
|
||||||
|
|
||||||
# Provider-specific configuration so you can fine-tune various
|
# Provider-specific configuration so you can fine-tune various
|
||||||
# backing providers for Vagrant. These expose provider-specific options.
|
# backing providers for Vagrant. These expose provider-specific options.
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ machine using `Vagrant <https://www.vagrantup.com/>`_ and Kayobe.
|
|||||||
Preparation
|
Preparation
|
||||||
===========
|
===========
|
||||||
|
|
||||||
First, ensure that Vagrant is installed and correctly configured.
|
First, ensure that Vagrant is installed and correctly configured to use
|
||||||
|
virtual box. Also install the following vagrant plugins:
|
||||||
|
|
||||||
|
vagrant plugin install vagrant-vbguest
|
||||||
|
|
||||||
|
Note: if using Ubuntu 16.04 LTS, you may be unable to install any plugins. To
|
||||||
|
work around this install the upstream version from www.virtualbox.org.
|
||||||
|
|
||||||
Next, clone kayobe::
|
Next, clone kayobe::
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user