[libvirt-designer 1/2] Fix libvirt caps -> libosinfo platform short id mapping

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

 



The code was building an id starting with kvm- while libosinfo qemu
description uses qemu-kvm-. Also, starting from qemu 1.2.0, there is
no separate qemu-kvm tarball.
guess_platform_from_connect is starting to be a bit magic, it may
be better to add a <machine> attribute to libosinfo <platform>
description and to use this to improve the matching between
libosinfo data and libvirt caps.
---
 examples/virtxml.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/virtxml.c b/examples/virtxml.c
index 09f49cf..a68843d 100644
--- a/examples/virtxml.c
+++ b/examples/virtxml.c
@@ -442,13 +442,13 @@ guess_platform_from_connect(GVirConnection *conn)
     }
 
     /* do some mappings:
-     * QEMU -> kvm
+     * QEMU -> qemu-kvm
      * Xen -> xen
      */
     type = g_ascii_strdown(hv_type, -1);
-    if (g_str_equal(type, "qemu")) {
+    if (g_str_equal(type, "qemu") && ver <= 1002000) {
         g_free(type);
-        type = g_strdup("kvm");
+        type = g_strdup("qemu-kvm");
     }
 
     major = ver / 1000000;
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]