[libvirt] libxl and non-absolute paths

Stefan Bader stefan.bader at canonical.com
Fri Feb 13 14:20:07 UTC 2015


Just recently we moved to libvirt 1.2.12 for the next release. Which brought up
a few problems when working with configs which we and Debian used to have.

A mild complaint towards the xml validation: it would be really nice of that
would be a bit more specific about what exactly it complains. It took me a while
to realize that "Extra element os in interleave" was trying to tell me
that the string of the loader element within the os section was not an absolute
path.

The issue here is that with libxl, I think the goal was to rather allow the
library to select the path prefix (like for pygrub where the full path got
removed recently). But now the xml validation disagrees.

This would go for bootloader for xenpv and loader (within os) for xenfv. And for
emulator in the device section. Though for that things are a bit more
complicated. The libxl driver now calls that with the help option and decides
from the output whether this is the "traditional" xen forked qemu or the
upstream qemu binary. Then it selects the device model depending on that outcome.
Not sure whether the libxl driver could query libxl for the path prefix. Right
now the most straight forward way seems to move back to a full path for the
emulator. At least now, by using the standard qemu binary for everything, we got
a predictable path that does not change with Xen versions. So its possible to
force migrate over to put /usr/bin/qemu-system-i386 there.

But for loader and bootloader, do you think it reasonable to change the
templates from absFilePath to filePath?

-Stefan

--- libvirt-1.2.12.orig/docs/schemas/domaincommon.rng   2015-01-23 12:46:24.0000
+++ libvirt-1.2.12/docs/schemas/domaincommon.rng        2015-02-13 10:00:43.1616
@@ -258,7 +258,7 @@
                 </choice>
               </attribute>
             </optional>
-            <ref name="absFilePath"/>
+            <ref name="filePath"/>
           </element>
         </optional>
         <optional>
@@ -1060,7 +1060,7 @@
       <optional>
         <element name="bootloader">
           <choice>
-            <ref name="absFilePath"/>
+            <ref name="filePath"/>
             <empty/>
           </choice>
         </element>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150213/e6bf802e/attachment-0001.sig>


More information about the libvir-list mailing list