Skip to content

Commit 4d5e464

Browse files
committed
qemu_template.sh: Allow parameters for VM image and memory
When testing multiple images one always has to copy them to the expected file name, and when trying to run two VMs this means one needs to either use separate directories or modify the qemu script. One also needs to modify the qemu script to bump the memory for K8s or for LUKS. Support parameters for the VM image name and the VM memory.
1 parent 83fbd6d commit 4d5e464

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build_library/qemu_template.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Options:
2626
-c FILE Config drive as an iso or fat filesystem image.
2727
-a FILE SSH public keys for login access. [~/.ssh/id_{dsa,rsa}.pub]
2828
-p PORT The port on localhost to map to the VM's sshd. [2222]
29+
-I FILE Set a custom image file.
30+
-M MB Set VM memory in MBs.
2931
-s Safe settings: single simple cpu and no KVM.
3032
-h this ;-)
3133
@@ -76,6 +78,12 @@ while [ $# -ge 1 ]; do
7678
-s|-safe)
7779
SAFE_ARGS=1
7880
shift ;;
81+
-I|-image-file)
82+
VM_IMAGE="$2"
83+
shift 2 ;;
84+
-M|-memory)
85+
VM_MEMORY="$2"
86+
shift 2 ;;
7987
-v|-verbose)
8088
set -x
8189
shift ;;

0 commit comments

Comments
 (0)