From 137483c053ee54d7a302873238220627c41da497 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Wed, 6 Aug 2014 07:27:29 +0200 Subject: [PATCH] vga=none if x-vga passthrough is enabled we need to disable virtual vga card if we passthrough a physical gpu Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 86d38378..7785b2ed 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2485,8 +2485,10 @@ sub config_to_command { my $rombar = $d->{rombar} && $d->{rombar} eq 'off' ? ",rombar=0" : ""; my $driver = $d->{driver} && $d->{driver} eq 'vfio' ? "vfio-pci" : "pci-assign"; my $xvga = $d->{'x-vga'} && $d->{'x-vga'} eq 'on' ? ",x-vga=on" : ""; - push @$cpuFlags, 'kvm=off' if $xvga && $xvga ne ''; - + if ($xvga && $xvga ne '') { + push @$cpuFlags, 'kvm=off'; + $vga = 'none'; + } $driver = "vfio-pci" if $xvga ne ''; my $pcidevices = $d->{pciid}; my $multifunction = 1 if @$pcidevices > 1;