Skip to content

Commit

Permalink
fix: correct VM RAM allocation check for Windows and macOS. close #1191
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed May 10, 2024
1 parent 4dab035 commit f516975
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f516975

Please sign in to comment.