mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 01:47:32 +08:00
feat: Check memory available
This commit is contained in:
parent
6724ddbd7d
commit
8bfbef0c16
@ -86,15 +86,11 @@ echo
|
||||
|
||||
# Check memory
|
||||
|
||||
if (( RAM_WANTED > RAM_AVAIL )); then
|
||||
error "Your configured RAM_SIZE of $WANTED_GB GB is higher than the $AVAIL_GB GB of memory available."
|
||||
if (( (RAM_WANTED + 500000000) > RAM_AVAIL )); then
|
||||
error "Your configured RAM_SIZE of $WANTED_GB GB is higher than the $AVAIL_GB GB of memory available, please set a lower value."
|
||||
exit 15
|
||||
fi
|
||||
|
||||
if (( (RAM_WANTED + 1950000000) > RAM_AVAIL )); then
|
||||
warn "your configured RAM_SIZE of $WANTED_GB GB is much too close to the $AVAIL_GB GB of memory available."
|
||||
fi
|
||||
|
||||
# Cleanup files
|
||||
rm -f /run/shm/qemu.*
|
||||
rm -f /run/shm/dsm.url
|
||||
|
Loading…
x
Reference in New Issue
Block a user