]> git.proxmox.com Git - qemu-server.git/commitdiff
status: skip query-proxmox-support if VM is offline
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 25 Nov 2020 10:26:35 +0000 (11:26 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 25 Nov 2020 10:26:37 +0000 (11:26 +0100)
otherwise pvestatd will print lots of warnings..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/QemuServer.pm

index 6966717b06ba3a05d40fc8473b5b27e4ba17ca33..0103386e760bcf46222357893fbcbeed2cb0d567 100644 (file)
@@ -2750,6 +2750,8 @@ sub vmstatus {
 
     foreach my $vmid (keys %$list) {
        next if $opt_vmid && ($vmid ne $opt_vmid);
+       next if !$res->{$vmid}->{pid}; #not running
+
        # we can't use the $qmpclient since it might have already aborted on
        # 'query-balloon', but this might also fail for older versions...
        my $qemu_support = eval { mon_cmd($vmid, "query-proxmox-support") };