fix(test): rename cloud image to .qcow2 for PVE upload compatibility

PVE upload API validates file extensions per content type. The
content=import type does not accept .img extension. The Ubuntu cloud
image is qcow2 format, so rename from .img to .qcow2 during download.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-20 13:52:11 -05:00
parent f2280c1c88
commit 6a2b1df804
@@ -17,7 +17,10 @@ ROOT_PASS="$2"
OUTPUT_DIR="${3:?Output directory required}"
CLOUD_IMAGE_URL="https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
CLOUD_IMAGE_FILENAME="noble-server-cloudimg-amd64.img"
# PVE upload API validates extensions per content type — content=import
# does not accept .img. The Ubuntu cloud image is qcow2 format, so we
# rename it to .qcow2 for compatibility with the upload endpoint.
CLOUD_IMAGE_FILENAME="noble-server-cloudimg-amd64.qcow2"
SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR"
SSH_CMD="sshpass -p ${ROOT_PASS} ssh ${SSH_OPTS} root@${NESTED_IP}"