]> git.proxmox.com Git - qemu-server.git/commitdiff
start: make not being able to set polling interval for ballooning non-critical
authorFiona Ebner <f.ebner@proxmox.com>
Thu, 23 Feb 2023 09:49:03 +0000 (10:49 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 23 Feb 2023 10:42:40 +0000 (11:42 +0100)
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

index a1a8b937ee8d36e62647ad31df0efc4458f1df4b..ff1e3c722d32ed45de5f7c0ba2628b8793c69874 100644 (file)
@@ -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) {