On Fri, Jun 22, 2012 at 3:56 AM, Christophe Fergeau <cfergeau(a)redhat.com> wrote:
Hey,
On Fri, Jun 22, 2012 at 12:30:37AM -0500, Doug Goldstein wrote:
> Add a new 'domdisplay' command that provides a URI for both VNC and
> SPICE connections. Presently the 'vncdisplay' command provides you with
> the port info that QEMU is listening on but there is no counterpart for
> SPICE. Additionally this provides you with the bind address as specified
> in the XML, which the existing 'vncdisplay' lacks.
>
> Signed-off-by: Doug Goldstein <cardoe(a)cardoe.com>
> ---
> tools/virsh.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 128 insertions(+), 0 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 4d34d49..88d4681 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -13624,6 +13624,133 @@ cmdSysinfo (vshControl *ctl, const vshCmd
> +
> + if (obj == NULL || obj->type != XPATH_STRING ||
> + obj->stringval == NULL || obj->stringval[0] == 0 ||
> + STREQ((const char *)obj->stringval, "0.0.0.0")) {
> + vshPrint(ctl, "%s://localhost:%d\n", scheme[iter], port);
> + } else {
> + vshPrint(ctl, "%s://%s:%d\n", scheme[iter],
> + (const char *)obj->stringval, port);
For SPICE, a URI you can pass to remote-viewer is
spice://hostname?port=xx&tls-port=yy&password=zzzzzzz
For simple cases, spice://hostname:port will be enough, but if you are
using secure channels you need the former.
Christophe
Thanks for that. Do I need to worry about the authority field for anything?
--
Doug Goldstein