From 44724cabb4b0b318f2b0fa9ff65fde42d9c7de1f Mon Sep 17 00:00:00 2001 From: Miguel Angel Jaimes Linares Date: Sat, 10 May 2025 17:04:00 +0200 Subject: [PATCH 1/2] feat: reduce Talos image size by using blkdiscard before writing to disk This change significantly reduces the snapshot size by zeroing out the disk before writing the Talos image. Inspired by https://github.com/apricote/hcloud-upload-image/issues/96 Thanks to the original suggestion from the hcloud-upload-image project for inspiring this optimization. --- packer/image_amd64.pkr.hcl | 4 ++++ packer/image_arm64.pkr.hcl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packer/image_amd64.pkr.hcl b/packer/image_amd64.pkr.hcl index 6871d07..da8d0c0 100644 --- a/packer/image_amd64.pkr.hcl +++ b/packer/image_amd64.pkr.hcl @@ -47,6 +47,10 @@ build { <<-EOT set -euo pipefail + # Discard the entire /dev/sda to free up space and make the snapshot smaller + echo 'Zeroing disk first before writing Talos image' + blkdiscard /dev/sda 2>/dev/null + echo 'Download Talos ${var.talos_version} image (${var.talos_schematic_id})' wget \ diff --git a/packer/image_arm64.pkr.hcl b/packer/image_arm64.pkr.hcl index 670f568..0b9a75f 100644 --- a/packer/image_arm64.pkr.hcl +++ b/packer/image_arm64.pkr.hcl @@ -47,6 +47,10 @@ build { <<-EOT set -euo pipefail + # Discard the entire /dev/sda to free up space and make the snapshot smaller + echo 'Zeroing disk first before writing Talos image' + blkdiscard /dev/sda 2>/dev/null + echo 'Download Talos ${var.talos_version} image (${var.talos_schematic_id})' wget \ From e1fc8d74f337b5393648960279770510ab17f2cc Mon Sep 17 00:00:00 2001 From: Miguel Angel Jaimes Linares Date: Sat, 10 May 2025 17:14:32 +0200 Subject: [PATCH 2/2] feat: enable QEMU Guest Agent by default Hetzner Talos builds now include the QEMU Guest Agent (GA) enabled by default, as documented in: - https://docs.hetzner.cloud/changelog#2025-04-23-talos-linux-v195-iso-now-available - https://www.talos.dev/v1.9/talos-guides/install/cloud-platforms/hetzner/#upload-image --- image.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/image.tf b/image.tf index 7722b1d..dda00de 100644 --- a/image.tf +++ b/image.tf @@ -36,6 +36,7 @@ locals { talos_image_extensions = distinct( concat( + ["siderolabs/qemu-guest-agent"], var.talos_image_extensions, var.longhorn_enabled ? local.talos_image_extentions_longhorn : [] )