XenAPI: Recommend using xl console rather than vncviewer

Some vncviewers do not support the -via option, so default to suggesting
xl console.  XenCenter continues to be an option for those running
Windows.

Change-Id: I1e53fd33d309e30a60031965e589167dcbacfbbe
This commit is contained in:
Bob Ball 2015-02-17 15:05:34 +00:00
parent 0df75a7288
commit e356d8cff6

View File

@ -149,12 +149,10 @@ SNAME_FIRST_BOOT="before_first_boot"
function wait_for_VM_to_halt { function wait_for_VM_to_halt {
set +x set +x
echo "Waiting for the VM to halt. Progress in-VM can be checked with vncviewer:" echo "Waiting for the VM to halt. Progress in-VM can be checked with XenCenter or xl console:"
mgmt_ip=$(echo $XENAPI_CONNECTION_URL | tr -d -c '1234567890.') mgmt_ip=$(echo $XENAPI_CONNECTION_URL | tr -d -c '1234567890.')
domid=$(get_domid "$GUEST_NAME") domid=$(get_domid "$GUEST_NAME")
sleep 20 # Wait for the vnc-port to be written echo "ssh root@$mgmt_ip \"xl console $domid\""
port=$(xenstore-read /local/domain/$domid/console/vnc-port)
echo "vncviewer -via root@$mgmt_ip localhost:${port:2}"
while true; do while true; do
state=$(xe_min vm-list name-label="$GUEST_NAME" power-state=halted) state=$(xe_min vm-list name-label="$GUEST_NAME" power-state=halted)
if [ -n "$state" ]; then if [ -n "$state" ]; then