From 9066f772eedb1e5729286ab6df4d952737b557bc Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Tue, 14 Oct 2014 10:13:19 +0200 Subject: [PATCH] labs: add BASE_DISK_SIZE configuration option A new configuration option, BASE_DISK_SIZE, allows users to change the size of the disk available to the node VMs. Because the disks grow dynamically, the cost of larger disks is limited in practice to additional time spent in zero_empty.sh. Change-Id: I47a72a08cfa51ba6c04306b64e04c4c2600975dd --- labs/config/deploy.osbash | 3 +++ labs/lib/osbash/virtualbox.install_base | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/labs/config/deploy.osbash b/labs/config/deploy.osbash index 36faf128..c5a2754b 100644 --- a/labs/config/deploy.osbash +++ b/labs/config/deploy.osbash @@ -14,4 +14,7 @@ # Note: shell user name and password are set in preseed.cfg VM_SHELL_USER=osbash +# Override disk size in MB (default is 8000 MB, inherited by node VMs) +# BASE_DISK_SIZE=8000 + # vim: set ai ts=4 sw=4 et ft=sh: diff --git a/labs/lib/osbash/virtualbox.install_base b/labs/lib/osbash/virtualbox.install_base index 5dd3a535..5c5a7d06 100644 --- a/labs/lib/osbash/virtualbox.install_base +++ b/labs/lib/osbash/virtualbox.install_base @@ -42,7 +42,7 @@ function vm_install_base { ${WBATCH:-:} vm_attach_guestadd-iso "$vm_name" ${OSBASH:-:} mkdir -pv "$DISK_DIR" - create_vdi "$base_build_disk" 8000 + create_vdi "$base_build_disk" "${BASE_DISK_SIZE:=8000}" vm_attach_disk "$vm_name" "$base_build_disk" #---------------------------------------------------------------------------