From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 423AE1FF0C0 for ; Wed, 04 Nov 2026 20:06:08 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 74486216A4; Wed, 04 Nov 2026 20:05:22 +0100 (CET) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH e2e-tests 22/38] plans,scripts: download a Debian cloud image onto pve1 Date: Wed, 4 Nov 2026 20:03:29 +0100 Message-ID: <20261104190345.2573464-23-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261104190345.2573464-1-m.koeppl@proxmox.com> References: <20261104190345.2573464-1-m.koeppl@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793819035409 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.026 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HMHHHNPM3UKJAK732LK6OMMERYYWIZET X-Message-ID-Hash: HMHHHNPM3UKJAK732LK6OMMERYYWIZET X-MailFrom: m.koeppl@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Download the image through the storage's download-url API during setup, so that a VM test can import its disk from the image with 'import-from' and boot a real guest. The image is pinned to a dated build and only kept if it matches its checksum, so all test runs use the same guest. Signed-off-by: Michael Köppl --- plans/complete.ron | 1 + scripts/download-cloud-image.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 scripts/download-cloud-image.sh diff --git a/plans/complete.ron b/plans/complete.ron index dd299fe..5d91647 100644 --- a/plans/complete.ron +++ b/plans/complete.ron @@ -16,6 +16,7 @@ Plan( "./scripts/update-packages.sh pve staging", "./scripts/download-container-image.sh local debian-12-standard_12.12-1_amd64.tar.zst", "./scripts/build-oci-image.sh local e2e-oci", + "./scripts/download-cloud-image.sh local https://cloud.debian.org/images/cloud/trixie/20261017-2634/debian-13-genericcloud-amd64-20261017-2634.qcow2 debian-13-genericcloud-amd64.qcow2 ec584ccabfef7120b4c4f7482adf0e615894d9292cedec446b64194b951ebe5dd97c336b5dcbae458333764b0edd516334506017f33c4f2020ef8d38b569ffe3", "./scripts/setup-pebble.sh", ], ), diff --git a/scripts/download-cloud-image.sh b/scripts/download-cloud-image.sh new file mode 100755 index 0000000..8d410d3 --- /dev/null +++ b/scripts/download-cloud-image.sh @@ -0,0 +1,21 @@ +#!/usr/bin/bash +# Downloads a VM disk image to the import content of a storage, so that VMs can be created from it +# with 'import-from'. The download is only kept if it matches the given SHA-512 checksum. +SSH_KEY=$(jq -r '.ssh_private_keyfile' "$CONFIG_PATH") +HOST=$(jq -r '.host' "$CONFIG_PATH") +USER=$(jq -r '.ssh_user' "$CONFIG_PATH") + +STORAGE=$1 +URL=$2 +FILENAME=$3 +SHA512=$4 + +ssh -i "$SSH_KEY" "$USER"@"$HOST" -o StrictHostKeyChecking=no <