From 167be4da1dc4cf4198b4c9b58fbfa0173e285b2f Mon Sep 17 00:00:00 2001 From: Blaz Date: Mon, 21 Feb 2022 03:33:25 +0100 Subject: [PATCH] Add extra_args option in vm conf file (#280) * Add extra_args option in vm conf file I added this simple piece of code for any extra arguments one wants to use. You just add extra_args variable to your vm conf file. ex. add host disk partition extra_args="-drive file=/dev/sdb2,cache=none,if=virtio" This is the easiest way to "extend" quickemu functionality. * add missing variable --- quickemu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quickemu b/quickemu index 42f8332..b83729b 100755 --- a/quickemu +++ b/quickemu @@ -1003,6 +1003,10 @@ function vm_boot() { -device tpm-tis,tpmdev=tpm0) fi + if [ -n "$extra_args" ]; then + args+=($extra_args) + fi + # The OSK parameter contains parenthesis, they need to be escaped in the shell # scripts. The vendor name, Quickemu Project, contains a space. It needs to be # double-quoted. @@ -1105,6 +1109,7 @@ ram="" secureboot="off" tpm="off" usb_devices=() +extra_args="" DELETE_DISK=0 DELETE_VM=0