[pve-devel] [PATCH qemu-server 2/2] properly parse 'vga' for termproxy
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Jun 17 10:41:17 CEST 2020
'vga' is a property string, we can't just assume it starts with the default key's value here either.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
PVE/API2/Qemu.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 95b1922..53dc594 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1779,8 +1779,9 @@ __PACKAGE__->register_method({
my $conf = PVE::QemuConfig->load_config($vmid, $node); # check if VM exists
if (!defined($serial)) {
- if ($conf->{vga} && $conf->{vga} =~ m/^serial\d+$/) {
- $serial = $conf->{vga};
+ if ($conf->{vga}) {
+ my $vga = PVE::QemuServer::parse_vga($conf->{vga});
+ $serial = $vga->{type} if $vga->{type} =~ m/^serial\d+$/;
}
}
--
2.20.1
More information about the pve-devel
mailing list