From f51697593a4650c5486661292e2febe1d16f8c71 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 10 May 2024 09:54:56 +0100 Subject: [PATCH] fix: correct VM RAM allocation check for Windows and macOS. close #1191 --- quickemu | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/quickemu b/quickemu index b229d38f12..03426bb9f0 100755 --- a/quickemu +++ b/quickemu @@ -330,9 +330,16 @@ function vm_boot() { fi echo ", ${RAM_VM} RAM" - if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then + if [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then + if [ "${RAM_VM//G/}" -lt 4 ]; then + echo "ERROR! The guest virtual machine has been allocated insufficient RAM to run Windows." + echo " You can override the guest RAM allocation by adding 'ram=4G' to ${VM}" + exit 1 + fi + elif [ "${guest_os}" == "macos" ]; then if [ "${RAM_VM//G/}" -lt 8 ]; then - echo "ERROR! You have insufficient RAM to run ${guest_os} in a VM" + echo "ERROR! The guest virtual machine has been allocated insufficient RAM to run macOS." + echo " You can override the guest RAM allocation by adding 'ram=8G' to ${VM}" exit 1 fi fi