3 # QEMU setup for trial VM
5 if [ -z "$ISO" ] ; then
6 if [ -z "$EFI" ] ; then
8 DISK2="-drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw"
10 BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
11 DISK2="-drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw"
14 if [ -z "$EFI" ] ; then
16 DISK2="-drive index=1,id=boot,media=cdrom,format=raw,file=tiniest.iso"
18 BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
19 DISK2="-drive index=1,id=boot,media=disk,format=raw,file=tiniest.iso"
23 [ -d disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8
26 -m 2G -M pc,accel=kvm -cpu host -vga qxl
27 -serial mon:stdio -echr 0x1c # Using ^\ as meta character
29 -drive index=0,id=disk,media=disk,format=raw,file=disk.raw
33 exec qemu-system-x86_64 ${ARGS[@]}