5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-10 01:18:01 +03:00

check for $vga->{type} instead of $vga

with commit 55655ebc32
we changed $vga to a parsed hash instead of a string
and forgot to check the property type in one place

this fixes an issue where a vm with a gpu passed through
with x-vga=on could not start

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2018-11-12 08:40:20 +01:00 committed by Thomas Lamprecht
parent c0c7dc792e
commit 8490283721

View File

@ -3505,7 +3505,7 @@ sub config_to_command {
push @$cmd, '-no-reboot' if defined($conf->{reboot}) && $conf->{reboot} == 0;
if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga ne 'none'){
if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga->{type} ne 'none'){
push @$devices, '-device', print_vga_device($conf, $vga, undef, $qxlnum, $bridges);
my $socket = vnc_socket($vmid);
push @$cmd, '-vnc', "unix:$socket,x509,password";