WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-cim

Re: [Xen-cim] LTC provider working on SLES/openwbem

To: veillard@xxxxxxxxxx
Subject: Re: [Xen-cim] LTC provider working on SLES/openwbem
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Fri, 21 Apr 2006 11:09:34 -0600
Cc: libvir-list@xxxxxxxxxx, xen-cim@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 21 Apr 2006 10:09:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060421075015.GY26811@xxxxxxxxxx>
List-help: <mailto:xen-cim-request@lists.xensource.com?subject=help>
List-id: xen-cim mailing list <xen-cim.lists.xensource.com>
List-post: <mailto:xen-cim@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=unsubscribe>
References: <44480A1C.6040404@xxxxxxxxxx> <20060421075015.GY26811@xxxxxxxxxx>
Sender: xen-cim-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
Daniel Veillard wrote:

On Thu, Apr 20, 2006 at 04:24:28PM -0600, Jim Fehlig wrote:
FYI,

I have managed to get one of the LTC providers (Xen_ComputerSystem) working on SLES using openwbem cimom, the xm shim, and libvirt. The following changes were made:

libvirt
- changed xend_parse_sexp_desc() to not fail if kernel not found. sexp from xend does not contain kernel for domain 0.

 Makes sense, could you send that patch ?

  thanks,

Daniel

Attached.

Jim

Index: xend_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xend_internal.c,v
retrieving revision 1.24
diff -u -r1.24 xend_internal.c
--- xend_internal.c     20 Apr 2006 14:28:01 -0000      1.24
+++ xend_internal.c     21 Apr 2006 18:02:22 -0000
@@ -1350,28 +1350,30 @@
     tmp = sexpr_node(root, "domain/bootloader");
     if (tmp != NULL)
        virBufferVSprintf(&buf, "  <bootloader>%s</bootloader>\n", tmp);
-    tmp = sexpr_node(root, "domain/image/linux/kernel");
-    if (tmp == NULL) {
-        /*
-         * TODO: we will need some fallback here for other guest OSes
-         */
-        virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
-                     "domain informations incomplete, missing kernel");
-        goto error;
+    if (sexpr_lookup(root, "domain/image")) {
+        tmp = sexpr_node(root, "domain/image/linux/kernel");
+        if (tmp == NULL) {
+           /*
+            * TODO: we will need some fallback here for other guest OSes
+            */
+           virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
+                        "domain informations incomplete, missing kernel");
+           goto error;
+        }
+        virBufferAdd(&buf, "  <os>\n", 7);
+        virBufferVSprintf(&buf, "    <type>linux</type>\n");
+        virBufferVSprintf(&buf, "    <kernel>%s</kernel>\n", tmp);
+        tmp = sexpr_node(root, "domain/image/linux/ramdisk");
+        if ((tmp != NULL) && (tmp[0] != 0))
+           virBufferVSprintf(&buf, "    <initrd>%s</initrd>\n", tmp);
+        tmp = sexpr_node(root, "domain/image/linux/root");
+        if ((tmp != NULL) && (tmp[0] != 0))
+           virBufferVSprintf(&buf, "    <root>%s</root>\n", tmp);
+        tmp = sexpr_node(root, "domain/image/linux/args");
+        if ((tmp != NULL) && (tmp[0] != 0))
+           virBufferVSprintf(&buf, "    <cmdline>%s</cmdline>\n", tmp);
+        virBufferAdd(&buf, "  </os>\n", 8);
     }
-    virBufferAdd(&buf, "  <os>\n", 7);
-    virBufferVSprintf(&buf, "    <type>linux</type>\n");
-    virBufferVSprintf(&buf, "    <kernel>%s</kernel>\n", tmp);
-    tmp = sexpr_node(root, "domain/image/linux/ramdisk");
-    if ((tmp != NULL) && (tmp[0] != 0))
-        virBufferVSprintf(&buf, "    <initrd>%s</initrd>\n", tmp);
-    tmp = sexpr_node(root, "domain/image/linux/root");
-    if ((tmp != NULL) && (tmp[0] != 0))
-        virBufferVSprintf(&buf, "    <root>%s</root>\n", tmp);
-    tmp = sexpr_node(root, "domain/image/linux/args");
-    if ((tmp != NULL) && (tmp[0] != 0))
-        virBufferVSprintf(&buf, "    <cmdline>%s</cmdline>\n", tmp);
-    virBufferAdd(&buf, "  </os>\n", 8);
     virBufferVSprintf(&buf, "  <memory>%d</memory>\n",
                       (int) (sexpr_u64(root, "domain/maxmem") << 10));
     virBufferVSprintf(&buf, "  <vcpu>%d</vcpu>\n",
_______________________________________________
Xen-cim mailing list
Xen-cim@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-cim
<Prev in Thread] Current Thread [Next in Thread>