public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] snapshot: save VM state: propagate error from QEMU
Date: Mon, 29 Aug 2022 12:54:54 +0200	[thread overview]
Message-ID: <20220829105454.55135-1-f.ebner@proxmox.com> (raw)

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 | 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";
 		    }
-- 
2.30.2





             reply	other threads:[~2022-08-29 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 10:54 Fiona Ebner [this message]
2022-08-30 10:46 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829105454.55135-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal