From d064764a7010b4d074d940e882e171efe25b37a8 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Mon, 29 Aug 2022 12:54:54 +0200 Subject: [PATCH] snapshot: save VM state: propagate error from QEMU So that there is a better chance to debug issues like in [0]. For suspending, which uses the same QMP calls, this is already done. [0]: https://forum.proxmox.com/threads/114203/ Signed-off-by: Fiona Ebner --- PVE/QemuConfig.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index cfef8d37..b75227b5 100644 --- a/PVE/QemuConfig.pm +++ b/PVE/QemuConfig.pm @@ -327,6 +327,9 @@ sub __snapshot_create_vol_snapshots_hook { my ($b, $t) = $render_state->($stat); print "completed saving the VM state in $t, saved $b\n"; last; + } elsif ($stat->{status} eq 'failed') { + my $err = $stat->{error} || 'unknown error'; + die "unable to save VM state and RAM - $err\n"; } else { die "query-savevm returned unexpected status '$stat->{status}'\n"; }