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

Perry N. Myers pmyers at redhat.com
Tue Jul 1 00:33:16 UTC 2008


Chris Lalancette wrote:
> 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?

Yes.  Even with StrickHostKeyChecking=no, if you don't blow away known 
hosts you'll get a nasty warning message.  And if you just do the 
known-hosts delete, you'll get a prompt to add the new key on each 
connect.  So the combination does the trick.  Of course, this is a 
controlled test environment.  Don't do this at home, kids...

> <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.

Already fixed :)

>> +
>> +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.

Thanks,

Perry




More information about the ovirt-devel mailing list