wfvm: use '-display none' instead of '-nographic'

This commit is contained in:
Sebastien Bourdeauducq 2020-06-15 13:27:01 +08:00
parent 873b2a0287
commit 876f278fdb
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ rec {
(map ({ listenAddr, targetAddr, port }: (map ({ listenAddr, targetAddr, port }:
",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${pkgs.socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}" ",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${pkgs.socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}"
) forwardedPorts); ) forwardedPorts);
qemuParams = mkQemuFlags (pkgs.lib.optional (!display) "-nographic" ++ [ qemuParams = mkQemuFlags (pkgs.lib.optional (!display) "-display none" ++ [
"-drive" "-drive"
"file=${image},index=0,media=disk,cache=unsafe" "file=${image},index=0,media=disk,cache=unsafe"
"-snapshot" "-snapshot"

View File

@ -74,7 +74,7 @@ let
installScript = pkgs.writeScript "windows-install-script" ( installScript = pkgs.writeScript "windows-install-script" (
let let
qemuParams = utils.mkQemuFlags (lib.optional (!impureMode) "-nographic" ++ [ qemuParams = utils.mkQemuFlags (lib.optional (!impureMode) "-display none" ++ [
# "CD" drive with bootstrap pkgs # "CD" drive with bootstrap pkgs
"-drive" "-drive"
"id=virtio-win,file=${bootstrapPkgs},if=none,format=raw,readonly=on" "id=virtio-win,file=${bootstrapPkgs},if=none,format=raw,readonly=on"
@ -127,7 +127,7 @@ let
] ++ (v.buildInputs or []); ] ++ (v.buildInputs or []);
} (let } (let
script = pkgs.writeScript "${v.name}-script" v.script; script = pkgs.writeScript "${v.name}-script" v.script;
qemuParams = utils.mkQemuFlags (lib.optional (!impureMode) "-nographic" ++ [ qemuParams = utils.mkQemuFlags (lib.optional (!impureMode) "-display none" ++ [
# Output image # Output image
"-drive" "-drive"
"file=c.img,index=0,media=disk,cache=unsafe" "file=c.img,index=0,media=disk,cache=unsafe"