From 66863b50b29f7d4025f333a5bf42d1b6c3082a0e Mon Sep 17 00:00:00 2001 From: Roger Sikorski Date: Wed, 23 Sep 2026 13:22:15 +0200 Subject: [PATCH] enable discard and ssd emulation on template disk Without discard=on, blocks freed inside the guest (fstrim.timer is enabled by default in Ubuntu cloud images) are never released on thin-provisioned storage like Ceph RBD, so disks only grow. Clones inherit the disk options from the template. Co-Authored-By: Claude Opus 5.5 (1M context) --- ubuntu-lts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-lts.sh b/ubuntu-lts.sh index 10f3913..6ccc208 100755 --- a/ubuntu-lts.sh +++ b/ubuntu-lts.sh @@ -94,7 +94,7 @@ virt-customize -a "/tmp/$SELECTED_RELEASE-server-cloudimg-amd64.modified.img" -- echo "Create Proxmox VM image from Ubuntu Cloud Image" qm create "$VM_ID" --memory 1024 --balloon 0 --cores 2 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --hotplug disk,network,usb,memory --numa 1 -qm set "$VM_ID" --scsi0 local-lvm:0,import-from="/tmp/$SELECTED_RELEASE-server-cloudimg-amd64.modified.img" +qm set "$VM_ID" --scsi0 local-lvm:0,import-from="/tmp/$SELECTED_RELEASE-server-cloudimg-amd64.modified.img",discard=on,ssd=1 qm set "$VM_ID" --agent enabled=1,fstrim_cloned_disks=1 echo "Create Cloud-Init Disk and configure boot"