X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FQemuServer.pm;h=9c0de45e6221f89a5492a10208f822b100a7c4d2;hb=8107b378c996e498c5ed775beadea48295101f8b;hp=63d7155b3aadf484f0b8324c944ab3a5072324ef;hpb=45cc6761db6b89ae996bdefad539da0929c05a11;p=qemu-server.git diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 63d7155..9c0de45 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) = @_;