status: skip query-proxmox-support if VM is offline

otherwise pvestatd will print lots of warnings..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-11-25 11:26:35 +01:00
parent 6891fd70ed
commit e5b18771b8

View 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") };