set -ex last_autoinstaller=$(ls -t1 autoinstall-2026* | head -n1) echo " ....... $last_autoinstaller" sleep 1 # qemu-system-x86_64 \ # -m 2048 \ # -enable-kvm \ # -drive file=${last_autoinstaller},format=raw,if=none,id=usbdisk \ # -device usb-ehci \ # -device usb-storage,drive=usbdisk \ # -bios /usr/share/ovmf/OVMF.fd _cdrom="" if [[ "$1" = "cdrom" ]]; then _cdrom="-drive file=${last_autoinstaller},format=raw,if=none,id=usbdisk -device usb-ehci \ -device usb-storage,drive=usbdisk \ " fi # Create a virtual disk first # qemu-img create -f qcow2 /tmp/test-disk.qcow2 20G # Boot the ISO as USB with the virtual disk as install target qemu-system-x86_64 \ -m 4096 \ -enable-kvm \ -drive file=/tmp/test-disk.qcow2,format=qcow2 $_cdrom \ -bios /usr/share/ovmf/OVMF.fd