diff --git a/scripts/vagrant/Vagrantfile b/scripts/vagrant/Vagrantfile index 3be024c3e..0b57d8a91 100644 --- a/scripts/vagrant/Vagrantfile +++ b/scripts/vagrant/Vagrantfile @@ -71,18 +71,6 @@ Vagrant.configure(2) do |config| vb.memory = "#{vmram}" vb.cpus = "#{vmcpu}" - # rsync the spdk directory if provision hasn't happened yet - unless File.exist? (".vagrant/machines/default/virtualbox/action_provision") - if spdk_dir != "none" - config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", type: "rsync", rsync__auto: false - end - - # Copy in the user's tools if they exists - if File.directory?(File.expand_path("~/vagrant_tools")) - config.vm.synced_folder "~/vagrant_tools", "/home/vagrant/tools", type: "rsync", rsync__auto: false - end - end - nvme_disk = 'nvme.vdi' unless File.exist? (nvme_disk) vb.customize ["createhd", "--filename", nvme_disk, "--variant", "Fixed", "--size", "1024"] @@ -119,12 +107,15 @@ Vagrant.configure(2) do |config| # Optional field if we want use other storage pools than default # libvirt.storage_pool_name = "vm" + end - # rsync the spdk directory if provision hasn't happened yet - unless File.exist? (".vagrant/machines/default/virtualbox/action_provision") - if spdk_dir != "none" - config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", type: "rsync" - end - end + # rsync the spdk directory if provision hasn't happened yet + if spdk_dir != "none" + config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", type: "rsync", rsync__auto: false + end + + # Copy in the user's tools if they exists + if File.directory?(File.expand_path("~/vagrant_tools")) + config.vm.synced_folder "~/vagrant_tools", "/home/vagrant/tools", type: "rsync", rsync__auto: false end end