From eab5f0fa3662ac7149401b8514bdca5cdfe50220 Mon Sep 17 00:00:00 2001 From: Prisacari Dmitrii Date: Fri, 8 Dec 2017 19:09:50 +0200 Subject: [PATCH] Vagrantfile: Fixed repeated OSD controller creation --- Vagrantfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 3f5a00f24..24176edcf 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -479,9 +479,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Virtualbox osd.vm.provider :virtualbox do |vb| # Create our own controller for consistency and to remove VM dependency - vb.customize ['storagectl', :id, - '--name', 'OSD Controller', - '--add', 'scsi'] + unless File.exist?("disk-#{i}-0.vdi") + # Adding OSD Controller; + # once the first disk is there assuming we don't need to do this + vb.customize ['storagectl', :id, + '--name', 'OSD Controller', + '--add', 'scsi'] + end + (0..1).each do |d| vb.customize ['createhd', '--filename', "disk-#{i}-#{d}", -- 2.47.3