Add ressource pool parameter

This commit is contained in:
thorstenspille 2023-10-29 22:35:07 +01:00
parent 54883a83d1
commit fbe274117f
2 changed files with 10 additions and 1 deletions

View File

@ -87,6 +87,9 @@ LXC_VIM_BG_DARK=1
# Default random password length # Default random password length
LXC_RANDOMPWD=32 LXC_RANDOMPWD=32
# Move lxc to specific ressource pool
LXC_RESSOURCE_POOL=""
# Automatically add meta tags to lxc container # Automatically add meta tags to lxc container
LXC_AUTOTAG=1 LXC_AUTOTAG=1

View File

@ -134,9 +134,15 @@ if [ $LXC_THREADS -gt 0 ]; then
LXC_CORES=--cores\ $LXC_THREADS LXC_CORES=--cores\ $LXC_THREADS
fi fi
if [[ $LXC_RESSOURCE_POOL != "" ]]; then
LXC_POOL=--pool\ $LXC_RESSOURCE_POOL
fi
# Create the container # Create the container
set +u set +u
pct create $LXC_NBR $TAGS $LXC_CORES --password $LXC_PWD -unprivileged $LXC_UNPRIVILEGED $LXC_TEMPLATE_STORAGE:vztmpl/$TMPL_NAME -rootfs $LXC_ROOTFS_STORAGE:$LXC_ROOTFS_SIZE; pct create $LXC_NBR $TAGS $LXC_CORES $LXC_POOL --password $LXC_PWD -unprivileged $LXC_UNPRIVILEGED $LXC_TEMPLATE_STORAGE:vztmpl/$TMPL_NAME -rootfs $LXC_ROOTFS_STORAGE:$LXC_ROOTFS_SIZE;
set -u set -u
sleep 2; sleep 2;