File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 44# by Foxlet <foxlet@furcode.co>
55
66VMDIR=$PWD
7+ MACHINE=$( qemu-system-x86_64 --machine help | grep q35 | cut -d" " -f1 | egrep -oe " .*-[0-9.]+" | sort -rV | head -1)
78OUT=" template.xml"
89
910print_usage () {
@@ -20,7 +21,7 @@ error() {
2021}
2122
2223generate (){
23- sed -e " s|VMDIR|$VMDIR |g" tools/template.xml.in > $OUT
24+ sed -e " s|VMDIR|$VMDIR |g" -e " s|MACHINE| $MACHINE |g " tools/template.xml.in > $OUT
2425 echo " $OUT has been generated in $VMDIR "
2526}
2627
Original file line number Diff line number Diff line change 55 <currentMemory unit='KiB'>2097152</currentMemory>
66 <vcpu placement='static'>4</vcpu>
77 <os>
8- <type arch='x86_64' machine='pc-q35-3.0 '>hvm</type>
8+ <type arch='x86_64' machine='MACHINE '>hvm</type>
99 <loader readonly='yes' type='pflash'>VMDIR/firmware/OVMF_CODE.fd</loader>
1010 <nvram>VMDIR/firmware/OVMF_VARS-1024x768.fd</nvram>
1111 <boot dev='hd'/>
You can’t perform that action at this time.
0 commit comments