]> git.proxmox.com Git - qemu-server.git/commitdiff
properly parse 'vga' for termproxy
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 17 Jun 2020 08:41:17 +0000 (10:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 17 Jun 2020 12:04:26 +0000 (14:04 +0200)
'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@proxmox.com>
PVE/API2/Qemu.pm

index 9cfaa29fdaa0ee393227ffa45d839c2916e47fd7..59f91618d4a600e0ffc1ff340eabc1a941e4deed 100644 (file)
@@ -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+$/;
            }
        }