From c94b6a0a566ee9384e30871734640def50cd7f56 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Sat, 21 Mar 2020 00:11:04 +0000 Subject: [PATCH] Add support for boot and driver ISO image Installing Windows 10 in VirtIO enabled Qemu requires additional drivers. This change makes it possible to exposed those drivers during a Windows 10 install. --- quickemu | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 2bf91c7..c7c6ce9 100755 --- a/quickemu +++ b/quickemu @@ -148,6 +148,16 @@ function vm_boot() { echo " Existing disk state will be preserved, no writes will be committed." fi + if [ -n "${iso}" ] && [ -e "${iso}" ]; then + local ISO_BOOT="-drive media=cdrom,file="${iso}",index=2" + echo " - Boot: ${iso}" + fi + + if [ -n "${driver_iso}" ] && [ -e "${driver_iso}" ]; then + local ISO_DRIVER="-drive media=cdrom,file="${driver_iso}",index=3" + echo " - Drivers: ${driver_iso}" + fi + local cores="1" local allcores=$(nproc --all) if [ ${allcores} -ge 8 ]; then @@ -222,8 +232,8 @@ function vm_boot() { # Boot the iso image ${QEMU} -name ${VMNAME},process=${VMNAME} \ ${BIOS} \ - -cdrom "${iso}" \ -drive id=disk,file=${disk_img},format=qcow2,if=virtio,aio=native,cache.direct=on \ + ${ISO_BOOT} ${ISO_DRIVER} \ -enable-kvm \ -machine q35,accel=kvm \ -cpu host,kvm=on \