From b7a861ce3498d2788df5a6c79a59cace86696105 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 30 Jan 2017 15:58:21 +0000 Subject: [PATCH] roles: bifrost-create-vm-nodes: Allow overriding the disk caching method Allow users to override the disk caching method used by the VMs. Change-Id: I795441f4e6c84dc513814a9af91ad25332a01c16 --- .../files/create_vm_nodes-for-role.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh b/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh index 970aaed19..3a57876c5 100755 --- a/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh +++ b/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh @@ -46,6 +46,7 @@ VM_CPU=${VM_CPU:-1} VM_RAM=${VM_RAM:-3072} VM_DISK=${VM_DISK:-10} VM_MACHINE="pc-1.0" +VM_DISK_CACHE=${VM_DISK_CACHE:-writeback} function is_distro { local os_release=false @@ -94,6 +95,7 @@ function create_node { # extra G to allow fuzz for partition table : flavor size and registered # size need to be different to actual size. DISK=$(( $4 + 1)) + DISK_CACHE=${10} case $5 in i386) ARCH='i686' ;; @@ -177,7 +179,7 @@ function create_node { ${EMULATOR} - +
@@ -266,7 +268,7 @@ do name=${names[$arrayindex]} fi - mac=$(create_node $name $VM_CPU $VM_RAM $VM_DISK amd64 $VM_NET_BRIDGE $VM_EMULATOR $VM_LOGDIR $VM_DOMAIN_TYPE) + mac=$(create_node $name $VM_CPU $VM_RAM $VM_DISK amd64 $VM_NET_BRIDGE $VM_EMULATOR $VM_LOGDIR $VM_DOMAIN_TYPE $VM_DISK_CACHE) printf "$mac,root,undefined,192.168.122.1,$VM_CPU,$VM_RAM,$VM_DISK,flavor,type,a8cb6624-0d9f-c882-affc-046ebb96ec0${i},$name,192.168.122.$((i+1))\n" >>$TEMPFILE done