From b7be4ba92fc0f4c1c2eaa7d4e744fc1f5b8dba35 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Thu, 18 Feb 2016 08:14:43 +0100 Subject: [PATCH] disable vnc server and add -nographic is no vga card is present For passthrough, we need to be sure that card is primary, so we need to disable vnc server Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 5165fab3..56f16869 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2813,8 +2813,6 @@ sub config_to_command { push @$cmd, '-chardev', "socket,id=qmp,path=$qmpsocket,server,nowait"; push @$cmd, '-mon', "chardev=qmp,mode=control"; - my $socket = vnc_socket($vmid); - push @$cmd, '-vnc', "unix:$socket,x509,password"; push @$cmd, '-pidfile' , pidfile_name($vmid); @@ -3031,6 +3029,13 @@ sub config_to_command { push @$cmd, '-vga', $vga if $vga && $vga !~ m/^serial\d+$/; # for kvm 77 and later + if ($vga && $vga !~ m/^serial\d+$/ && $vga ne 'none'){ + my $socket = vnc_socket($vmid); + push @$cmd, '-vnc', "unix:$socket,x509,password"; + } else { + push @$cmd, '-nographic'; + } + # time drift fix my $tdf = defined($conf->{tdf}) ? $conf->{tdf} : $defaults->{tdf};