We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03da8cb commit 93d6ff3Copy full SHA for 93d6ff3
extensions/Proxmox/proxmox.sh
@@ -334,7 +334,11 @@ restore_snapshot() {
334
335
execute_and_wait POST "/nodes/${node}/qemu/${vmid}/snapshot/${snap_name}/rollback"
336
337
- execute_and_wait POST "/nodes/${node}/qemu/${vmid}/status/start"
+ status_response=$(call_proxmox_api GET "/nodes/${node}/qemu/${vmid}/status/current")
338
+ vm_status=$(echo "$status_response" | jq -r '.data.status')
339
+ if [ "$vm_status" = "stopped" ];then
340
+ execute_and_wait POST "/nodes/${node}/qemu/${vmid}/status/start"
341
+ fi
342
343
echo '{"status": "success", "message": "Instance Snapshot restored"}'
344
}
0 commit comments