From 0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 16 Feb 2014 01:46:28 +0100 Subject: [PATCH] vm/windows: Reintroduce setting up /nix/store. Now we're doing this at the point where we're saving the VM state. Unfortunately it's not quite right, because the controller VM is shut down _before_ we're saving the state, so the share gets disconnected despite autodisconnect being deactivated during setup. We can get around this issue by finally introducing the xchg share, which is the last item to be implemented before we can merge to master. Signed-off-by: aszlig --- pkgs/build-support/vm/windows/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/build-support/vm/windows/default.nix b/pkgs/build-support/vm/windows/default.nix index 2ecadbae7cfb..b7c18f6d16c5 100644 --- a/pkgs/build-support/vm/windows/default.nix +++ b/pkgs/build-support/vm/windows/default.nix @@ -17,6 +17,13 @@ let }); runAndSuspend = runInVM "winvm.img" { + command = lib.concatStringsSep "; " [ + "set -e" + "net config server /autodisconnect:-1" + "net use S: '\\\\192.168.0.2\\nixstore' /persistent:yes" + "mkdir -p /nix/store" + "mount -o bind /cygdrive/s /nix/store" + ]; suspendTo = "state.gz"; };