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 <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2016-02-18 08:14:43 +01:00 committed by Dietmar Maurer
parent bd92244c35
commit b7be4ba92f

View 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};