You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "abh1sar (via GitHub)" <gi...@apache.org> on 2026/04/07 05:05:51 UTC

Re: [PR] KVM NAS backup: resume VM and exit on backup failure [cloudstack]

abh1sar commented on code in PR #12872:
URL: https://github.com/apache/cloudstack/pull/12872#discussion_r3042959584


##########
scripts/vm/hypervisor/kvm/nasbackup.sh:
##########
@@ -221,6 +223,20 @@ mount_operation() {
 cleanup() {
   local status=0
 
+  # Resume the VM if it was paused (e.g. by virsh backup-begin)
+  if [[ -n "$VM" ]]; then
+    local vm_state
+    vm_state=$(virsh -c qemu:///system domstate "$VM" 2>/dev/null)

Review Comment:
   What happens here If vm was in stopped state? I think $VM will still be set.
   Can you test it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org