From 42605939a4f911fb3bf777e2d80e91cf3f5aa710 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Tue, 29 Aug 2017 11:50:58 +0100 Subject: [PATCH] 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. --- Vagrantfile | 5 ++++- doc/source/development.rst | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 5b46f952a..489591b61 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 guest to mount the folder. And the optional third # 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 # backing providers for Vagrant. These expose provider-specific options. diff --git a/doc/source/development.rst b/doc/source/development.rst index 977637c11..233f7f31b 100644 --- a/doc/source/development.rst +++ b/doc/source/development.rst @@ -8,7 +8,13 @@ machine using `Vagrant `_ and Kayobe. 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::