====== HA in Proxmox LXC ====== NOT WORKING! ====== Prepare CT ====== ===== Create CT ===== * Hostname: ''hassio'' * Template: ''debian-10-standard..'' * Root Disk: * Storage: ''local-zfs'' * Disk size (GiB): ''2'' * Mount optionas: ''noatime'' * CPU: 1 * Memory: * Memory (MiB): 512 * Swap (MiB): 512 ===== Options ===== * Unprivileged container: ''Yes'' * Features: ''Nesting'', ''keyctl'' (needed to run Docker in unprivileged container) ===== Resources ===== Docker cannot use features of ZFS filesystem and it failsback to very inefficient ''vfs'' storage driver. To workaround, Docker needs well supported filesystem. * Add * Mountpoint * Storage: ''local'' (DIR type storage, to emulate any block device in file) * Disk size (GiB): ''2'' * Path: ''/var/lib/docker'' * Mount options: ''noatime'' ===== Host shell ===== Modify CT config: lxc.cgroup.devices.allow: a lxc.cap.drop: ====== Install HA ====== apt-get update && apt-get dist-upgrade reboot apt-get install curl network-manager apparmor jq curl -sSL https://get.docker.com | bash # Downgrade docker apt-get install docker-ce=5:18.09.9~3-0~debian-buster apt-get install docker-ce-cli=5:18.09.9~3-0~debian-buster echo "docker-ce hold" | dpkg --set-selections echo "docker-ce-cli hold" | dpkg --set-selections curl -sL https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh | bash -s -- -m qemux86-64 ====== issue ====== ===== container init caused "write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied"": unknown") ===== apt-get install docker-ce=5:18.09.9~3-0~debian-buster apt-get install docker-ce-cli=5:18.09.9~3-0~debian-buster echo "docker-ce hold" | dpkg --set-selections echo "docker-ce-cli hold" | dpkg --set-selections