mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-07-27 08:18:56 +00:00
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:
@@ -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) ──────────
|
||||
|
||||
Reference in New Issue
Block a user