From b19911ef06ca501ec2daca9794671a014cf012d8 Mon Sep 17 00:00:00 2001 From: Clint Branham Date: Fri, 20 Mar 2026 13:08:47 -0500 Subject: [PATCH] fix(test): use absolute path for disk import in prepare-test-vm.sh The cloud image is downloaded as content=iso, but import-from requires content type 'images' or 'import'. Use the absolute node path (/var/lib/vz/template/iso/) instead of the storage volume reference (local:iso/) to work around this constraint. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/infrastructure/scripts/prepare-test-vm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/infrastructure/scripts/prepare-test-vm.sh b/tests/infrastructure/scripts/prepare-test-vm.sh index 23f9480..1e35ef7 100755 --- a/tests/infrastructure/scripts/prepare-test-vm.sh +++ b/tests/infrastructure/scripts/prepare-test-vm.sh @@ -73,12 +73,14 @@ pwsh -NoProfile -Command " " # ── Step 4: Import disk (module cmdlet) ──────────────────────────── +# The cloud image was downloaded as content=iso. The import-from syntax requires +# content type 'images' or 'import', so we use the absolute node path instead. echo "Importing disk image via Import-PveVmDisk..." pwsh -NoProfile -Command " Import-Module PSProxmoxVE; ${CONNECT_CMD} Import-PveVmDisk -Node '${NODE}' -VmId ${VMID} -Disk 'scsi0' \ -TargetStorage 'local-lvm' \ - -Source 'local:iso/${CLOUD_IMAGE_FILENAME}' -Wait + -Source '/var/lib/vz/template/iso/${CLOUD_IMAGE_FILENAME}' -Wait " # ── Step 5: Configure VM (module cmdlet — AdditionalConfig) ──────────