properly parse 'vga' for termproxy

'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>
This commit is contained in:
Fabian Grünbichler 2020-06-17 10:41:17 +02:00 committed by Thomas Lamprecht
parent d3efae29f5
commit d7856be59e

View 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+$/;
}
}