fix: correct VM RAM allocation check for Windows and macOS. close #1191
This commit is contained in:
parent
4dab035d46
commit
f51697593a
11
quickemu
11
quickemu
|
@ -330,9 +330,16 @@ function vm_boot() {
|
||||||
fi
|
fi
|
||||||
echo ", ${RAM_VM} RAM"
|
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
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue