From 6a95b605bcf94ba8385660a6681ffbbe46f2e39d Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Wed, 17 Sep 2014 12:39:50 +0100 Subject: [PATCH] XenAPI: Fix race condition waiting for VM to start Buildroot on Ubuntu Trusty is slow to populate the vnc-port. Wait for 20 seconds until the port is populated. Change-Id: I50e5b5a161207d46e8ce0e304d816e8e5b68dbe8 --- tools/xen/install_os_domU.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh index 12e861e18a..9bf8f73c92 100755 --- a/tools/xen/install_os_domU.sh +++ b/tools/xen/install_os_domU.sh @@ -171,6 +171,7 @@ function wait_for_VM_to_halt { echo "Waiting for the VM to halt. Progress in-VM can be checked with vncviewer:" mgmt_ip=$(echo $XENAPI_CONNECTION_URL | tr -d -c '1234567890.') domid=$(get_domid "$GUEST_NAME") + sleep 20 # Wait for the vnc-port to be written port=$(xenstore-read /local/domain/$domid/console/vnc-port) echo "vncviewer -via root@$mgmt_ip localhost:${port:2}" while true; do