wfvm: support disabling fake RTC

Avoids SSL 'certificate not yet valid' errors.
This commit is contained in:
Sebastien Bourdeauducq 2020-06-22 14:43:02 +08:00
parent d895203b5b
commit bd8fa5d955
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ rec {
wfvm@localhost:$1 .
'';
wfvm-run = { name, image, script, display ? false, isolateNetwork ? true, forwardedPorts ? [] }:
wfvm-run = { name, image, script, display ? false, isolateNetwork ? true, forwardedPorts ? [], fakeRtc ? true }:
let
restrict =
if isolateNetwork
@ -75,7 +75,7 @@ rec {
(map ({ listenAddr, targetAddr, port }:
",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${pkgs.socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}"
) forwardedPorts);
qemuParams = mkQemuFlags (pkgs.lib.optional (!display) "-display none" ++ [
qemuParams = mkQemuFlags (pkgs.lib.optional (!display) "-display none" ++ pkgs.lib.optional (!fakeRtc) "-rtc base=localtime" ++ [
"-drive"
"file=${image},index=0,media=disk,cache=unsafe"
"-snapshot"