Created
April 18, 2022 05:29
-
-
Save thetooth/4b77a8a105a205f48c004936caefb9c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Using host $SMARTOS_HOST..." | |
payload=`ssh root@$SMARTOS_HOST "vmadm lookup -j -o uuid alias=$1 | json -a uuid | xargs vmadm info"` | |
if [ "$payload" = "" ]; then | |
echo "VM does not exist or does not have a VNC console" | |
exit | |
fi | |
target=`echo $payload | jq -r .vnc.host` | |
display=`echo $payload | jq -r .vnc.display` | |
gvncviewer $target:$display |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment