From 31ed8dba2f05fb078d4e686a65a8a15878c5da67 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Mon, 8 May 2017 16:43:38 -0700 Subject: [PATCH] scripts/libvirt: Allow QEMU/KVM disk size to be customized --- scripts/libvirt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/libvirt b/scripts/libvirt index f5a7c7be..0e4858a0 100755 --- a/scripts/libvirt +++ b/scripts/libvirt @@ -3,6 +3,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" VM_MEMORY=${VM_MEMORY:-1024} +VM_DISK=${VM_DISK:-10} source "${DIR}/common.sh" @@ -43,7 +44,7 @@ function usage { echo -e "\tdestroy\t\tdestroy the QEMU/KVM nodes" } -COMMON_VIRT_OPTS="--memory=$VM_MEMORY --vcpus=1 --pxe --disk pool=default,size=6 --os-type=linux --os-variant=generic --noautoconsole --events on_poweroff=preserve" +COMMON_VIRT_OPTS="--memory=${VM_MEMORY} --vcpus=1 --pxe --disk pool=default,size=${VM_DISK} --os-type=linux --os-variant=generic --noautoconsole --events on_poweroff=preserve" function create_docker { virt-install --name $NODE1_NAME --network=bridge:docker0,mac=$NODE1_MAC $COMMON_VIRT_OPTS --boot=hd,network