'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.gruenbich...@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 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel