about summary refs log tree commit diff
path: root/pkgs/build-support/vm
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-02-16 00:27:43 +0100
committeraszlig <aszlig@redmoonstudios.org>2014-02-26 04:51:56 +0100
commit3e91192f079c2eac4bd15d564bb2fd4702506b36 (patch)
tree1fd3b9e280d6d2e72a0400826cf5ff93fcf117e8 /pkgs/build-support/vm
parentc731467e2c83f3df0b59c44575616e6241a63c7d (diff)
downloadnixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.tar
nixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.tar.gz
nixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.tar.bz2
nixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.tar.lz
nixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.tar.xz
nixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.tar.zst
nixlib-3e91192f079c2eac4bd15d564bb2fd4702506b36.zip
vm/windows: Wait for VDE switch to startup.
This could possibly cause flapping whenever qemu is too fast in starting
up. As we are running with the shell's -e flag, the socat check also
ensures that the VDE switch is properly started and causes the whole
build to fail, should it not start up within 20 seconds.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/build-support/vm')
-rw-r--r--pkgs/build-support/vm/windows/controller/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix
index 49d6815a3dce..22451e0e3947 100644
--- a/pkgs/build-support/vm/windows/controller/default.nix
+++ b/pkgs/build-support/vm/windows/controller/default.nix
@@ -148,6 +148,8 @@ let
     QEMU_VDE_SOCKET="$(pwd)/vde.ctl"
     MONITOR_SOCKET="$(pwd)/monitor"
     ${vde2}/bin/vde_switch -s "$QEMU_VDE_SOCKET" &
+    echo 'alive?' | ${socat}/bin/socat - \
+      UNIX-CONNECT:$QEMU_VDE_SOCKET/ctl,retry=20
   '';
 
   vmExec = if installMode then ''