]> git.proxmox.com Git - qemu-server.git/commitdiff
snapshot: save VM state: propagate error from QEMU
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 29 Aug 2022 10:54:54 +0000 (12:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 30 Aug 2022 10:45:40 +0000 (12:45 +0200)
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 <f.ebner@proxmox.com>
PVE/QemuConfig.pm

index cfef8d3737b557a2d707bd7d36f4e20a58f724ce..b75227b58257e896698174ab85a878adfff3b0eb 100644 (file)
@@ -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";
                    }