Update ha_container.sh

This commit is contained in:
tteckster 2021-12-02 06:19:20 -05:00 committed by GitHub
parent 732008e364
commit 3c80d4158a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ ROOTFS=${STORAGE}:${DISK_REF-}${DISK}
# Create LXC # Create LXC
msg "Creating LXC container..." msg "Creating LXC container..."
DISK_SIZE=16G DISK_SIZE=8G
pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null
if [ "$STORAGE_TYPE" == "zfspool" ]; then if [ "$STORAGE_TYPE" == "zfspool" ]; then
warn "Some containers may not work properly due to ZFS not supporting 'fallocate'." warn "Some containers may not work properly due to ZFS not supporting 'fallocate'."
@ -149,7 +149,7 @@ ARCH=$(dpkg --print-architecture)
HOSTNAME=homeassistant HOSTNAME=homeassistant
TEMPLATE_STRING="local:vztmpl/${TEMPLATE}" TEMPLATE_STRING="local:vztmpl/${TEMPLATE}"
pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \ pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \
-hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 4096 \ -hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 -cores 2 -memory 2048 \
-ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null -ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null
# Modify LXC permissions to support Docker # Modify LXC permissions to support Docker