for vms, it showed:
Starting VM 100 failed: status

instead of showing the actual status

Signed-off-by: Dominik Csapak <[email protected]>
---
 PVE/API2/Nodes.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 2db5e1ec..a7d34fb1 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -1563,11 +1563,13 @@ __PACKAGE__->register_method ({
                                }
                            }
                        } else {
+                           my $typeText = '';
                            if ($d->{type} eq 'lxc') {
-                               print STDERR "Starting CT $vmid failed: 
$status\n";
+                               $typeText = ' CT';
                            } elsif ($d->{type} eq 'qemu') {
-                               print STDERR "Starting VM $vmid failed: 
status\n";
+                               $typeText = ' VM';
                            }
+                           print STDERR "Starting$typeText $vmid failed: 
$status\n";
                        }
                    };
                    warn $@ if $@;
-- 
2.11.0


_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to