From 9f9482c22eb2d6dddd675dfbe2edfb0527a36c18 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Dec 2024 11:40:44 +0000 Subject: [PATCH] install_incus --- setup-usi-mm | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/setup-usi-mm b/setup-usi-mm index 3e112ef..24fe627 100755 --- a/setup-usi-mm +++ b/setup-usi-mm @@ -49,12 +49,39 @@ zfs create crypt/lxd zfs create crypt/lxd/dir zfs create crypt/lxd/storage +echo "Installing Incus" +curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc +sh -c 'cat < /etc/apt/sources.list.d/zabbly-incus-lts-6.0.sources +Enabled: yes +Types: deb +URIs: https://pkgs.zabbly.com/incus/lts-6.0 +Suites: $(. /etc/os-release && echo ${VERSION_CODENAME}) +Components: main +Architectures: $(dpkg --print-architecture) +Signed-By: /etc/apt/keyrings/zabbly.asc + +EOF' + +apt update +apt install incus -y +incus ls +incus admin shutdown +systemctl stop incus +systemctl stop incus.socket +systemctl stop incus-user.socket + echo "Deleting everything in /var/lib/incus/*" rm /var/lib/incus/* -r echo "Setting mountpoint /var/lib/incus to crypt/lxd/dir" zfs set mountpoint=/var/lib/incus crypt/lxd/dir +echo "Starting Incus" +systemctl start incus.socket +systemctl start incus-user.socket +systemctl start incus +incus ls + echo "Configuring sysctl" echo "vm.swappiness = 1" > /etc/sysctl.d/50-usi-mm.conf echo "vm.min_free_kbytes = 131072" >> /etc/sysctl.d/50-usi-mm.conf @@ -139,10 +166,6 @@ reboot } post_reboot_script () { -echo "Disabling lxd and delete /var/snap/lxd/common/lxd/*" -snap disable lxd -rm /var/snap/lxd/common/lxd/* -r - echo "Executing /root/onstart" bash /root/onstart