feat: Enforce a minimal disk size per Windows version (#2122)

This commit is contained in:
Kroese
2026-08-09 22:16:20 +02:00
committed by GitHub
parent 433c83cab0
commit 7e3e24780d
2 changed files with 69 additions and 11 deletions
+14
View File
@@ -160,6 +160,8 @@ configureMachine() {
return 79
fi
setDiskMinimum "$DETECTED" || return 79
if ! setMachine "$DETECTED" "$iso" "$dir" "$desc"; then
error "Failed to configure the virtual machine for $desc!"
return 80
@@ -401,6 +403,7 @@ startInstall() {
if [ -z "$CUSTOM" ] && [[ "${VERSION,,}" != "http"* ]]; then
checkMemory "$VERSION" || return 67
setDiskMinimum "$VERSION" || return 67
fi
# Work from the temporary directory so the persistent source path can
@@ -1454,6 +1457,17 @@ checkMemory() {
return 0
}
setDiskMinimum() {
local id="$1"
local required
required=$(getRequiredDisk "$id") || return
DISK_MINIMUM="$required"
return 0
}
restoreBootMode() {
local current="${BOOT_MODE:-}"