diff --git a/make.sh b/make.sh index e036acc..11eec8f 100755 --- a/make.sh +++ b/make.sh @@ -4,6 +4,7 @@ # by Foxlet VMDIR=$PWD +MACHINE=$(qemu-system-x86_64 --machine help | grep q35 | cut -d" " -f1 | egrep -oe ".*-[0-9.]+" | sort -rV | head -1) OUT="template.xml" print_usage() { @@ -20,7 +21,7 @@ error() { } generate(){ - sed -e "s|VMDIR|$VMDIR|g" tools/template.xml.in > $OUT + sed -e "s|VMDIR|$VMDIR|g" -e "s|MACHINE|$MACHINE|g" tools/template.xml.in > $OUT echo "$OUT has been generated in $VMDIR" } diff --git a/tools/template.xml.in b/tools/template.xml.in index ac36489..321552f 100644 --- a/tools/template.xml.in +++ b/tools/template.xml.in @@ -5,7 +5,7 @@ 2097152 4 - hvm + hvm VMDIR/firmware/OVMF_CODE.fd VMDIR/firmware/OVMF_VARS-1024x768.fd