]> git.proxmox.com Git - qemu-server.git/commitdiff
check for $vga->{type} instead of $vga
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 12 Nov 2018 07:40:20 +0000 (08:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 12 Nov 2018 08:27:21 +0000 (09:27 +0100)
with commit 55655ebc32ce4eb3fe52f233ec4ac5926b15603f
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>
PVE/QemuServer.pm

index 2f25c6851359ba56a6864df4a4edeb0cc1ab2731..199cf4695b86af482fc16f0b3eb6e68c1b49c256 100644 (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";