vagrant: stop rsync from wiping changes from /vpp
*Fixes issue where any changes to the vpp directory withing vagrant
are wiped if user reboots the vagrant vm
*Rsync will now only run if provisioning hasn't occured before
@@ -62,6 +62,13 @@ Vagrant.configure(2) do |config|
config.ssh.forward_agent = true
+ config.vm.provider "virtualbox" do |vb|
+ vb.customize ["modifyvm", :id, "--ioapic", "on"]
+ vb.memory = "#{vmram}"
+ vb.cpus = "#{vmcpu}"
+
+ # rsync the vpp directory if provision hasn't happened yet
+ unless File.exist? (".vagrant/machines/default/virtualbox/action_provision")
config.vm.synced_folder "../../", "/vpp", type: "rsync",
rsync__auto: false,
rsync__exclude: [
@@ -76,11 +83,7 @@ Vagrant.configure(2) do |config|
"build-root/deb/debian/*.install",
"build-root/deb/debian/changes",
"build-root/tools"]
-
- config.vm.provider "virtualbox" do |vb|
- vb.customize ["modifyvm", :id, "--ioapic", "on"]
- vb.memory = "#{vmram}"
- vb.cpus = "#{vmcpu}"
+ end
#support for the SSE4.x instruction is required in some versions of VB.
vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"]
