diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix index da3be51c102..3d763468113 100644 --- a/pkgs/build-support/vm/windows/controller/default.nix +++ b/pkgs/build-support/vm/windows/controller/default.nix @@ -67,6 +67,19 @@ let initScript = writeScript "init.sh" ('' #!${stdenv.shell} + ${coreutils}/bin/cp -L "${sshKey}" /ssh.key + ${coreutils}/bin/chmod 600 /ssh.key + '' + (if installMode then '' + echo -n "Waiting for Windows installation to finish..." + while ! ${netcat}/bin/netcat -z 192.168.0.1 22; do + echo -n . + # Print a dot every 10 seconds only to shorten line length. + ${coreutils}/bin/sleep 10 + done + echo " success." + # Loop forever, because this VM is going to be killed. + ${loopForever} + '' else '' ${coreutils}/bin/mkdir -p /etc/samba /etc/samba/private /var/lib/samba ${coreutils}/bin/cat > /etc/samba/smb.conf <