diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 63d7155b..9c0de45e 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2668,6 +2668,8 @@ sub vmstatus { $d->{template} = PVE::QemuConfig->is_template($conf); + $d->{serial} = 1 if conf_has_serial($conf); + $res->{$vmid} = $d; } @@ -2862,6 +2864,18 @@ sub foreach_volid { } } +sub conf_has_serial { + my ($conf) = @_; + + for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++) { + if ($conf->{"serial$i"}) { + return 1; + } + } + + return 0; +} + sub vga_conf_has_spice { my ($vga) = @_;