mirror of
https://github.com/dockur/windows.git
synced 2026-08-24 15:48:59 +01:00
feat: Enforce a minimal disk size per Windows version (#2122)
This commit is contained in:
@@ -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:-}"
|
||||
|
||||
Reference in New Issue
Block a user