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
This commit is contained in:
Blaz 2022-02-21 03:33:25 +01:00 committed by GitHub
parent 99af8f9923
commit 167be4da1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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