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] start: make not being able to set polling interval for ballooning non-critical
Date: Thu, 23 Feb 2023 10:49:03 +0100	[thread overview]
Message-ID: <20230223094903.29376-1-f.ebner@proxmox.com> (raw)

The guest will be running, so it's misleading to fail the start task
here. Also ensures that we clean up the hibernation state upon resume
even if there is an error here, which did not happen previously[0].

[0]: https://forum.proxmox.com/threads/123159/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/QemuServer.pm | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a1a8b937..ff1e3c72 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6053,13 +6053,16 @@ sub vm_start_nolock {
     }
 
    if (!defined($conf->{balloon}) || $conf->{balloon}) {
-	mon_cmd(
-	    $vmid,
-	    'qom-set',
-	    path => "machine/peripheral/balloon0",
-	    property => "guest-stats-polling-interval",
-	    value => 2
-	);
+	eval {
+	    mon_cmd(
+		$vmid,
+		'qom-set',
+		path => "machine/peripheral/balloon0",
+		property => "guest-stats-polling-interval",
+		value => 2
+	    );
+	};
+	log_warn("could not set polling interval for ballooning - $@") if $@;
     }
 
     if ($resume) {
-- 
2.30.2





             reply	other threads:[~2023-02-23  9:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  9:49 Fiona Ebner [this message]
2023-02-23 10:44 ` [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=20230223094903.29376-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