cloudstack/scripts/vm/hypervisor
James Peru 30a54d0ecc NAS backup: resume paused VM on backup failure and fix missing exit
When a NAS backup job fails (e.g. due to backup storage being full or
I/O errors), the VM may remain indefinitely paused because:

1. The cleanup() function never checks or resumes the VM's paused state
   that was set by virsh backup-begin during the push backup operation.

2. The 'Failed' case in the backup job monitoring loop calls cleanup()
   but lacks an 'exit' statement, causing an infinite loop where the
   script repeatedly detects the failed job and calls cleanup().

3. Similarly, backup_stopped_vm() calls cleanup() on qemu-img convert
   failure but does not exit, allowing the loop to continue with
   subsequent disks despite the failure.

This fix:
- Adds VM state detection and resume to cleanup(), ensuring the VM is
  always resumed if found in a paused state during error handling
- Adds missing 'exit 1' after cleanup() in the Failed backup job case
  to prevent the infinite monitoring loop
- Adds missing 'exit 1' after cleanup() in backup_stopped_vm() on
  qemu-img convert failure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 06:55:06 +03:00
..
external/provisioner extension: improve host vm power reporting (#11619) 2026-01-30 14:07:22 +05:30
kvm NAS backup: resume paused VM on backup failure and fix missing exit 2026-03-17 06:55:06 +03:00
ovm3 removed code in comments (#11145) 2025-12-08 16:31:48 +01:00
vmware Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687) 2022-03-28 11:40:26 -03:00
xenserver Add support for vTPM for XenServer and XCP-ng 8.3/8.4 (#12263) 2026-01-28 13:12:32 +02:00
update_host_passwd.sh Fixes script that perform change password on hosts (#6783) 2022-12-16 17:21:44 +01:00
versions.sh interpret /etc/redhet-release better (#7570) 2023-06-09 10:29:42 +02:00