#
# QEMU setup for trial VM
+ISO=${ISO:-tiniest.iso}
+
N="12345678"
if [ ${#1} = 1 ] && [ "${N#*$1}" != "$N" ] ; then
REPLY=$1
VARIANT=(
"use bootimage.raw as harddisk with legacy boot (and boot menu)"
"use bootimage.raw as harddisk with UEFI boot"
- "use tiniest.iso as harddisk with legacy boot (and boot menu)"
- "use tiniest.iso as harddisk with UEFI boot"
- "use tiniest.iso as cdrom with legacy boot (and boot menu)"
- "use tiniest.iso as cdrom with UEFI boot"
- "use tiniest.iso as USB disk with legacy boot (and boot menu)"
- "use tiniest.iso as USB disk with UEFI boot"
+ "use ${ISO} as harddisk with legacy boot (and boot menu)"
+ "use ${ISO} as harddisk with UEFI boot"
+ "use ${ISO} as cdrom with legacy boot (and boot menu)"
+ "use ${ISO} as cdrom with UEFI boot"
+ "use ${ISO} as USB disk with legacy boot (and boot menu)"
+ "use ${ISO} as USB disk with UEFI boot"
)
select V in "${VARIANT[@]}" ; do
[ -z "$REPLY" ] && exit 0
FILE=bootimage.raw
-[ $REPLY -ge 3 ] && FILE=tiniest.iso
+[ $REPLY -ge 3 ] && FILE=${ISO}
MEDIA=disk
[ $REPLY -ge 5 ] && MEDIA=cdrom
[ $REPLY -ge 7 ] && MEDIA=usb
)
echo "${ARGS[*]}" | sed "s/ -/\n -/g"
-exec qemu-system-x86_64 ${ARGS[@]}
+qemu-system-x86_64 ${ARGS[@]}
+tput reset # EFI boot messes up the terminal
+