From: Ralph Ronnquist Date: Fri, 9 Jun 2023 14:24:12 +0000 (+1000) Subject: polishing X-Git-Tag: good-1~17 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=52b051d78ead51fe4ab0513543dbfc619fd6a337;p=rrq%2Ftiniest.git polishing --- diff --git a/vm.sh b/vm.sh index 74274e6..d3f535d 100755 --- a/vm.sh +++ b/vm.sh @@ -1,19 +1,20 @@ #!/bin/bash # -# QEMU setup for trial3 VM +# QEMU setup for trial VM + +BOOT="-boot menu=on" +[ -z "$EFI" ] || BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd" + +[ -d disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8 + -if [ -n "$EFI" ] ; then - BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd" -else - BOOT="-boot menu=on" -fi ARGS=( -m 2G -M pc,accel=kvm -cpu host - -serial mon:stdio -echr 0x1c + -serial mon:stdio -echr 0x1c # Using ^\ as meta character -vga qxl $BOOT -drive index=0,id=disk,media=disk,format=raw,file=disk.raw -drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw ) -qemu-system-x86_64 ${ARGS[@]} +exec qemu-system-x86_64 ${ARGS[@]}