From 45bfb26da07cf6633fd9908db0ef33a9c382ce04 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 25 Jan 2024 01:18:27 +0100 Subject: [PATCH] feat: Support older Windows versions (#382) --- src/boot.sh | 6 ++++-- src/proc.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/boot.sh b/src/boot.sh index 2257d4d..7af4ee8 100644 --- a/src/boot.sh +++ b/src/boot.sh @@ -21,6 +21,9 @@ case "${BOOT_MODE,,}" in ROM="OVMF_CODE_4M.ms.fd" VARS="OVMF_VARS_4M.ms.fd" ;; + windows_legacy) + BOOT_OPTS="" + ;; legacy) BOOT_OPTS="" ;; @@ -30,9 +33,8 @@ case "${BOOT_MODE,,}" in ;; esac -if [[ "${BOOT_MODE,,}" != "legacy" ]]; then +if [[ "${BOOT_MODE,,}" != "legacy" ]] && [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then - BOOT_OPTS="" OVMF="/usr/share/OVMF" DEST="$STORAGE/${BOOT_MODE,,}" diff --git a/src/proc.sh b/src/proc.sh index c78a4f2..648224d 100644 --- a/src/proc.sh +++ b/src/proc.sh @@ -39,7 +39,7 @@ if [[ "$KVM" != [Nn]* ]]; then CPU_FEATURES="kvm=on" KVM_OPTS=",accel=kvm -enable-kvm" - if [[ "${BOOT_MODE,,}" == "windows" ]]; then + if [[ "${BOOT_MODE,,}" == "windows" ]] || [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then CPU_FEATURES="kvm=on,+hypervisor,+invtsc,l3-cache=on,migratable=no,hv_passthrough"