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