[Ovirt-devel] [PATCH] Two convenience scripts to simplify appliance usage

Chris Lalancette clalance at redhat.com
Mon Jun 30 07:03:35 UTC 2008


Perry Myers wrote:
> ovirt-firefox.sh is used to launch firefox on the appliance
> ovirt-view-vm.sh is used to launch virt-viewer on a specific managed node
> connected to a specific virtual machine.

Sure, should make life a little easier.

> +KNOWN_HOSTS=~/.ssh/ovirt-known_hosts
> +SSH_ARGS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=$KNOWN_HOSTS -Yf"
> +
> +rm -f $KNOWN_HOSTS > /dev/null 2>&1
> +ssh $SSH_ARGS 192.168.50.2 firefox --no-remote

Sneaky.  Redefine where the known hosts goes, and blow it away.  Do we need both
"StrictHostKeyChecking=no" and the removal of KnownHosts, though?

<snip>

> +if [[ $# < 2 ]]; then
> +	echo "usage: $0 node vm"
> +    echo "  node: hostname of node to connect to (i.e. node3)"
> +    echo "  vm  : name of virtual machine on designated node to view"
> +	exit 1
> +fi

Minor whitespace damage.

> +
> +NODE=$1
> +VM=$2
> +
> +rm -f $KNOWN_HOSTS > /dev/null 2>&1
> +ssh $SSH_ARGS 192.168.50.2 virt-viewer -c qemu+tcp://$NODE.priv.ovirt.org/system $VM

Other than the two minor issues above, looks good, so I will ACK it.

Chris Lalancette




More information about the ovirt-devel mailing list