Skip to content

Commit

Permalink
Merge pull request #738 from jukkar/skip-govm-if-needed
Browse files Browse the repository at this point in the history
e2e: Do not try to use govm if user has specified the VM address
  • Loading branch information
klihub committed Nov 24, 2021
2 parents ed165ca + 502d741 commit 8db7038
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions demo/lib/host.bash
Expand Up @@ -203,12 +203,14 @@ host-create-vm() {
}

host-wait-vm-ssh-server() {
VM_IP=$(${GOVM} ls | awk "/$VM_NAME/{print \$4}")
while [ "x$VM_IP" == "x" ]; do
host-command "${GOVM} start \"$VM_NAME\""
sleep 5
if [ -z "$VM_IP" ]; then
VM_IP=$(${GOVM} ls | awk "/$VM_NAME/{print \$4}")
done
while [ "x$VM_IP" == "x" ]; do
host-command "${GOVM} start \"$VM_NAME\""
sleep 5
VM_IP=$(${GOVM} ls | awk "/$VM_NAME/{print \$4}")
done
fi
echo "# VM SSH server : ssh $VM_SSH_USER@$VM_IP"

if [ -d "$HOME/vms/data/$VM_NAME" ]; then
Expand Down

0 comments on commit 8db7038

Please sign in to comment.