mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-09-20 00:02:03 +02:00
Enable VirtIO for Windows disks
This commit is contained in:
parent
8c2f2d0adc
commit
9210054c05
32
quickemu
32
quickemu
|
@ -891,38 +891,20 @@ function vm_boot() {
|
||||||
args+=(-drive if=floppy,format=raw,file="${floppy}")
|
args+=(-drive if=floppy,format=raw,file="${floppy}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${guest_os}" == "windows" ]; then
|
|
||||||
# shellcheck disable=SC2054
|
|
||||||
args+=(-device ahci,id=ahci)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${iso}" ]; then
|
if [ -n "${iso}" ]; then
|
||||||
if [ "${guest_os}" == "windows" ]; then
|
# shellcheck disable=SC2054
|
||||||
# shellcheck disable=SC2054
|
args+=(-drive media=cdrom,index=0,file="${iso}")
|
||||||
args+=(-drive id=iso,if=none,media=cdrom,file="${iso}"
|
|
||||||
-device ide-cd,drive=iso,bus=ahci.1,bootindex=1)
|
|
||||||
else
|
|
||||||
# shellcheck disable=SC2054
|
|
||||||
args+=(-drive media=cdrom,index=0,file="${iso}")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${fixed_iso}" ]; then
|
if [ -n "${fixed_iso}" ]; then
|
||||||
if [ "${guest_os}" == "windows" ]; then
|
# shellcheck disable=SC2054
|
||||||
# shellcheck disable=SC2054
|
args+=(-drive media=cdrom,index=1,file="${fixed_iso}")
|
||||||
args+=(-drive id=fixed_iso,if=none,media=cdrom,file="${fixed_iso}"
|
|
||||||
-device ide-cd,drive=fixed_iso,bus=ahci.2)
|
|
||||||
else
|
|
||||||
# shellcheck disable=SC2054
|
|
||||||
args+=(-drive media=cdrom,index=1,file="${fixed_iso}")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Attach the unattended configuration to Windows guests when booting from ISO
|
# Attach the unattended configuration to Windows guests when booting from ISO
|
||||||
if [ -n "${iso}" ] && [ "${guest_os}" == "windows" ] && [ -e "${VMDIR}/unattended.iso" ]; then
|
if [ -n "${iso}" ] && [ "${guest_os}" == "windows" ] && [ -e "${VMDIR}/unattended.iso" ]; then
|
||||||
# shellcheck disable=SC2054
|
# shellcheck disable=SC2054
|
||||||
args+=(-drive id=unattended,if=none,media=cdrom,file="${VMDIR}/unattended.iso"
|
args+=(-drive media=cdrom,index=2,file="${VMDIR}/unattended.iso")
|
||||||
-device ide-cd,drive=unattended,bus=ahci.3)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${guest_os}" == "macos" ]; then
|
if [ "${guest_os}" == "macos" ]; then
|
||||||
|
@ -940,10 +922,6 @@ function vm_boot() {
|
||||||
# shellcheck disable=SC2054,SC2206
|
# shellcheck disable=SC2054,SC2206
|
||||||
args+=(-device ${MAC_DISK_DEV},drive=SystemDisk
|
args+=(-device ${MAC_DISK_DEV},drive=SystemDisk
|
||||||
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
||||||
elif [ "${guest_os}" == "windows" ]; then
|
|
||||||
# shellcheck disable=SC2054,SC2206
|
|
||||||
args+=(-device ide-hd,drive=SystemDisk,bus=ahci.0,bootindex=0
|
|
||||||
-drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
|
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2054,SC2206
|
# shellcheck disable=SC2054,SC2206
|
||||||
args+=(-device virtio-blk-pci,drive=SystemDisk
|
args+=(-device virtio-blk-pci,drive=SystemDisk
|
||||||
|
|
Loading…
Reference in New Issue
Block a user