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) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-20 13:08:47 -05:00
parent ca0cd945a0
commit b19911ef06
@@ -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) ──────────