mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-06 00:49:03 +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->{template} = PVE::QemuConfig->is_template($conf);
|
||||||
|
|
||||||
|
$d->{serial} = 1 if conf_has_serial($conf);
|
||||||
|
|
||||||
$res->{$vmid} = $d;
|
$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 {
|
sub vga_conf_has_spice {
|
||||||
my ($vga) = @_;
|
my ($vga) = @_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user