https://forum.proxmox.com/threads/using-the-pct-qm-command-within-a-hook-script.125614/ for reference.
I am using the hookscript to revert a vm to a prior snapshot with the nohup command suggested above:
This works fine enough, but I'd like the snapshot to be powered off, and then the hookscript power it back on after reverting. When I try some combination of
it errors out immediately because I have two operations trying to lock the lockfile. Obviously I'd need to wait for the first to complete, but I'm not quite sure how to do that. I tried some variation of "wait $!" in between but that didn't work. Whats the simplest way to do a revert and startup in the same post-stop hookscript?
I am using the hookscript to revert a vm to a prior snapshot with the nohup command suggested above:
Code:
nohup /usr/sbin/qm destroy "$1" &>/dev/null &
This works fine enough, but I'd like the snapshot to be powered off, and then the hookscript power it back on after reverting. When I try some combination of
Code:
nohup /usr/sbin/qm rollback "$1" "snapshot" &>/dev/null &
nohup /usr/sbin/qm start "$1"