[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

xen:// (was: Re: [Libvir] remote access ?)



Daniel Veillard wrote:
On Mon, Oct 15, 2007 at 09:26:26AM -0400, Mark Johnson wrote:
On 10/15/07, Richard W.M. Jones <rjones redhat com> wrote:
Mark Johnson wrote:
[root fedora ~]# virsh connect xen+tcp://localhost
libvir: Remote error : Connection refused
error: Failed to connect to the hypervisor
IME this usually happens because I forget to open the right port on the
firewall (both incoming and outgoing ...)
Thanks Rich.  My problem was I typed the line wrong.  It needed
a trailing /

 e.g.

[root fedora ~]# virsh connect xen+tcp://localhost
Should have been...
  [root fedora ~]# virsh connect xen+tcp://localhost/

  Hum, strange, that's still a valid absolute URI except with an empty
path I find strange we have a problem with this, as we don't use the path for the access in practice ...

The attached patch is "a bit of a hack" (but so is the current code).

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
Index: src/xend_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xend_internal.c,v
retrieving revision 1.147
diff -u -p -r1.147 xend_internal.c
--- src/xend_internal.c	8 Oct 2007 15:02:48 -0000	1.147
+++ src/xend_internal.c	15 Oct 2007 15:35:38 -0000
@@ -2182,8 +2182,8 @@ xenDaemonOpen(virConnectPtr conn, const 
      * see xenUnifiedOpen) or any URI beginning with "xen:///" then
      * try default paths and methods to get to the xend socket.
      */
-    if (strcasecmp (name, "xen") == 0 ||
-        strncasecmp (name, "xen:///", 7) == 0) {
+    if (STRCASEEQ (name, "xen") ||
+        strncasecmp (name, "xen://", 6) == 0) {
         /*
          * try first to open the unix socket
          */

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]