mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-11-07 19:31:58 +01:00
Add cpu core count
This commit is contained in:
parent
862929cd51
commit
c51d2a91ff
@ -27,6 +27,9 @@ LXC_SHAREFS_STORAGE="local-zfs"
|
|||||||
# Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank)
|
# Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank)
|
||||||
LXC_SHAREFS_MOUNTPOINT="tank"
|
LXC_SHAREFS_MOUNTPOINT="tank"
|
||||||
|
|
||||||
|
# cpu core count (default: 0 = unlimited)
|
||||||
|
LXC_THREADS=0
|
||||||
|
|
||||||
# Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024)
|
# Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024)
|
||||||
LXC_MEM=1024
|
LXC_MEM=1024
|
||||||
|
|
||||||
|
@ -130,9 +130,13 @@ else
|
|||||||
fi
|
fi
|
||||||
echo "Will now create LXC Container $LXC_NBR!";
|
echo "Will now create LXC Container $LXC_NBR!";
|
||||||
|
|
||||||
|
if [ $LXC_THREADS -gt 0 ]; then
|
||||||
|
LXC_CORES=--cores$LXC_THREADS
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the container
|
# Create the container
|
||||||
set +u
|
set +u
|
||||||
pct create $LXC_NBR $TAGS --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 --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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user