Daniel Veillard wrote:
- if our default behaviour was a bit less pathological
virsh: error: failed to connect to the hypervisor
paphio:~/libvirt -> virsh help
libvir: error : operation failed: xenProxyOpen
virsh: error: failed to connect to the hypervisor
This patch fixes the pathological failure of 'virsh help command'.
(1) We allow ctl->conn to be NULL, meaning "no connection".
(2) All cmd* functions check vshConnectionUsability where required (I
checked this) except the ones which don't need to such as cmdHelp.
(3) vshInit has changed so that not being able to connect to a
hypervisor is a non-fatal condition. Thus after vshInit, ctl->conn may
be NULL.
(4) I reordered the list of commands alphabetically, except that "help"
is listed first.
$ virsh help save
libvir: error : operation failed: xenProxyOpen
error: failed to connect to the hypervisor
NAME
save - save a domain state to a file
SYNOPSIS
save <domain> <file>
DESCRIPTION
Save a running domain.
OPTIONS
<domain> domain name, id or uuid
<file> where to save the data
Rich.
--
Emerging Technologies, Red Hat -
http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903