diff --git a/images/debian.yaml b/images/debian.yaml index b2ff54fe..097ecd10 100644 --- a/images/debian.yaml +++ b/images/debian.yaml @@ -1274,6 +1274,12 @@ packages: architectures: - arm64 + - packages: + - cloud-guest-utils + action: install + types: + - vm + - packages: - shim-signed action: install @@ -1430,6 +1436,29 @@ actions: types: - vm +- trigger: post-files + action: |- + #!/bin/sh + set -eux + + # Automatic disk resize + cat << EOF > /etc/systemd/system/incus-growpart.service + [Unit] + Description=Incus - grow root partition + + [Service] + Type=oneshot + ExecStartPre=-/usr/bin/growpart /dev/sda 2 + ExecStart=/sbin/resize2fs /dev/sda2 + + [Install] + WantedBy=default.target + EOF + + systemctl enable incus-growpart + types: + - vm + - trigger: post-files action: |- #!/bin/sh