mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-30 11:15:51 +00:00
add serial:1 to vmstatus when config has a serial device configured
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
45cc6761db
commit
8107b378c9
@ -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) = @_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user