Add support for preventing OOM kill on certain VMs.

This commit is contained in:
Tom Alexander 2025-09-27 19:02:06 -04:00
parent daaf427286
commit 25957105c9
Signed by: talexander
GPG Key ID: 36C99E8B3C39D85F
2 changed files with 6 additions and 1 deletions

View File

@ -38,6 +38,7 @@ fi
: ${VNC_WIDTH:="1920"}
: ${VNC_HEIGHT:="1080"}
: ${BIND9P:=""}
: ${PREVENT_OOM:="NO"}
: "${CD:=}"
: ${SHUTDOWN_TIMEOUT:="600"} # 10 minutes
@ -278,6 +279,10 @@ function start_body {
local mac_address
mac_address=$(calculate_mac_address "$name")
if [ "$PREVENT_OOM" = "YES" ]; then
protect -d -i -p "$$"
fi
local additional_args=()
if [ "$NETWORK" = "NAT" ]; then

View File

@ -1,2 +1,2 @@
[options]
IgnorePkg = linux linux-headers
IgnorePkg = linux linux-headers chromium