From 570d4a19670360b7428f7760b096b48f829b6d61 Mon Sep 17 00:00:00 2001
From: Markos Chandras <mchandras@suse.de>
Date: Tue, 3 Oct 2017 13:21:03 +0100
Subject: [PATCH] xci: scripts: start-new-vm.sh: Do not break on idle SSH
 connections

Add ServerAliveInterval and ServerAliveCountMax directives in order
to try and keep SSH connections alive. This aims to solve ssh timeouts
like the following one on busy hypervisors:

packet_write_wait: Connection to UNKNOWN port 0: Broken pipe

Change-Id: I58029b41226098d6a44181434ad8653f72384e9d
Signed-off-by: Markos Chandras <mchandras@suse.de>
---
 xci/scripts/vm/start-new-vm.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index 1019ce88..faadb87d 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -187,6 +187,8 @@ echo "Dropping a minimal .ssh/config file"
 cat > $HOME/.ssh/config<<EOF
 Host *
 StrictHostKeyChecking no
+ServerAliveInterval 60
+ServerAliveCountMax 5
 IdentityFile ${BASE_PATH}/xci/scripts/vm/id_rsa_for_dib
 
 Host *_xci_vm
-- 
2.16.6