From 8490283721cc13e520b5a77e416bb153d604ff73 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 12 Nov 2018 08:40:20 +0100 Subject: [PATCH] check for $vga->{type} instead of $vga 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 --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 2f25c68..199cf46 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -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"; -- 2.39.2