Home Assistant LXC script error on Proxmox 7

hi,

i got it working here. you can patch the script:
Code:
diff --git a/create_container.sh b/create_container.sh
index 49844b5..28a5c45 100644
--- a/create_container.sh
+++ b/create_container.sh
@@ -78,13 +78,13 @@ wget -qO - ${REPO}/tarball/master | tar -xz --strip-components=1
 # Modify LXC permissions to support Docker
 LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
 cat <<EOF >> $LXC_CONFIG
-lxc.cgroup.devices.allow: a
+lxc.cgroup2.devices.allow: a
 lxc.cap.drop:
 EOF
 
 # Load modules for Docker before starting LXC
 cat << 'EOF' >> $LXC_CONFIG
-lxc.hook.pre-start: sh -ec 'for module in aufs overlay; do modinfo $module; $(lsmod | grep -Fq $module) || modprobe $module; done;'
+lxc.hook.pre-start: sh -ec 'for module in overlay; do modinfo $module; $(lsmod | grep -Fq $module) || modprobe $module; done;'
 EOF
 
 # Set autodev hook to enable access to devices in container

and then it should work (though i haven't tested the actual functionality of the homeassistant, the container can start as expected)
I am new to Proxmox so my question is how do you run this script? I tried paste it but get bash errors.
 

Attachments

  • Untitled6.png
    Untitled6.png
    28.4 KB · Views: 20
I am new to Proxmox so my question is how do you run this script? I tried paste it but get bash errors.
you apply the diff on the repository of the homeassistant [0].

try like the following:
Code:
$ git clone https://github.com/whiskerz007/proxmox_hassio_lxc
$ cd proxmox_hassio_lxc
# then save the contents of my diff in a file called homeassistant.patch using your favorite editor
$ patch -Np1 -i homeassistant.patch # this applies that patch
finally you run the create_container.sh script

[0]: https://github.com/whiskerz007/proxmox_hassio_lxc
 
you need a docker version with cgroupv2 support

For those who don't know how to upgrade the docker inside the HA LXC, just type within the LXC shell:

apt update && apt upgrade -Y && reboot
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!