refactor(ci): use PSProxmoxVE cmdlets in test VM preparation

Replace raw qm/SSH commands with module cmdlets where possible:
- Invoke-PveStorageDownload for cloud image download
- New-PveVm for VM creation
- Set-PveCloudInitConfig for cloud-init user/password/IP
- Invoke-PveCloudInitRegenerate to apply config
- Start-PveVm to boot the VM

SSH/SCP retained only for operations without API support:
- Snippet upload (no snippet API)
- pvesm set for snippets content type
- qm importdisk (no importdisk cmdlet)
- qm set for --scsi0, --cicustom, --agent, --boot (not in Set-PveVmConfig)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-19 12:52:44 -05:00
parent f1f5f3f180
commit d98bd40476
2 changed files with 81 additions and 54 deletions
+3 -1
View File
@@ -256,7 +256,9 @@ jobs:
OUTPUT=$(bash ${SCRIPTS_DIR}/prepare-test-vm.sh \
"${{ steps.provision.outputs.host }}" \
"${PVE_PASSWORD}" \
200)
200 \
"${{ steps.target.outputs.node }}" \
"${{ steps.provision.outputs.token }}")
LINUX_VMID=$(echo "$OUTPUT" | grep "^LINUX_VMID=" | cut -d= -f2)
echo "linux_vmid=${LINUX_VMID}" >> "$GITHUB_OUTPUT"