]> git.proxmox.com Git - qemu-server.git/commitdiff
disable vnc server and add -nographic is no vga card is present
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 18 Feb 2016 07:14:43 +0000 (08:14 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 18 Feb 2016 11:54:47 +0000 (12:54 +0100)
For passthrough, we need to be sure that card is primary,
so we need to disable vnc server

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm

index 5165fab3f66e90a1f92c1a23bd8af6650c1d4f3b..56f168692e06301b5cce7e23eaa22c3e4af9515f 100644 (file)
@@ -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};