URI documentation and xen:/// patch (was: Re: RFC: replace "no support for hypervisor" error)

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

 



Daniel Veillard wrote:
On Tue, Jun 19, 2007 at 02:16:23PM +0100, Richard W.M. Jones wrote:
(1) Document the URI formats fully.

  definitely

-- This is a feature which has been requested a few times and I will do it anyway if Daniel Veillard will do the magic to set up a "http://libvirt.org/uri.html"; page.

  Okay I will do that within an hour :-)

The documentation for this should appear here shortly:

  http://libvirt.org/uri.html

(If you only see the holding page, then please come back in up to half an hour).

The attached one-liner adds a xen:/// URI, intended as the normal method to connect to the Xen hypervisor on the local machine. This is just a placeholder until I can get around to rewriting the Xen name parsing code in xen_unified.c. This patch makes local (xen:///) and remote (xen://hostname/) Xen URI-style calls possible and hopefully doesn't prevent logical extensions to the Xen URI syntax from being added in future.

Also, I couldn't get file path URIs to work as they seem to be intended, but I haven't looked very closely yet:

  $ virsh -c ///var/lib/xend/xend-socket list
  libvir: error : no support for hypervisor
  virsh: error: failed to connect to the hypervisor

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.120
diff -u -r1.120 xend_internal.c
--- src/xend_internal.c	19 Jun 2007 09:12:56 -0000	1.120
+++ src/xend_internal.c	19 Jun 2007 16:08:20 -0000
@@ -1943,11 +1943,12 @@
     xmlURIPtr uri = NULL;
     int ret;
 
-    /* If the name is just "xen" (it might originally have been NULL, see
-     * xenUnifiedOpen) then try default paths and methods to get to the
-     * xend socket.
+    /* If the name is just "xen" (it might originally have been NULL,
+     * 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) {
+    if (strcasecmp (name, "xen") == 0 ||
+        strncasecmp (name, "xen:///", 7) == 0) {
         /*
          * try first to open the unix socket
          */

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]