Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 591661 - Upstream qemu has changed the version string
Upstream qemu has changed the version string
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Chris Lalancette
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-12 15:37 EDT by Chris Lalancette
Modified: 2010-07-21 12:48 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-21 12:48:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Lalancette 2010-05-12 15:37:24 EDT
Description of problem:
The version string that qemu used to print out looked like:

QEMU PC emulator version x.yy.zz (qemu-kvm-

And libvirt expected this.  Recently (on April 28, qemu commit f75ca1ae205f24dae296c82d534c37746f87232f), this has changed to look like:

QEMU emulator version x.yy.zz (qemu-kvm-

Note the lack of "PC".  We need to update qemudParseHelpStr() to be able to handle this new version.
Comment 1 Chris Lalancette 2010-05-12 15:52:07 EDT
I've got the following patch for this:

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 5fa8c0a..08a2865 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1260,6 +1260,8 @@ static unsigned long long qemudComputeCmdFlags(const char 
  * whether it is KVM QEMU or mainline QEMU.
  */
 #define QEMU_VERSION_STR    "QEMU PC emulator version"
+/* in Qemu 0.13, the version string changed to remove the PC part */
+#define QEMU_VERSION_STR_013 "QEMU emulator version"
 #define QEMU_KVM_VER_PREFIX "(qemu-kvm-"
 #define KVM_VER_PREFIX      "(kvm-"
 
@@ -1277,11 +1279,13 @@ int qemudParseHelpStr(const char *qemu,
 
     *flags = *version = *is_kvm = *kvm_version = 0;
 
-    if (!STRPREFIX(p, QEMU_VERSION_STR))
+    if (STRPREFIX(p, QEMU_VERSION_STR))
+        p += strlen(QEMU_VERSION_STR);
+    else if (STRPREFIX(p, QEMU_VERSION_STR_013))
+        p += strlen(QEMU_VERSION_STR_013);
+    else
         goto fail;
 
-    p += strlen(QEMU_VERSION_STR);
-
     SKIP_BLANKS(p);
 
     major = virParseNumber(&p);


Jes is going to test it out for me and get back to me about it.

Chris Lalancette
Comment 2 Chris Lalancette 2010-05-20 16:06:19 EDT
This is now upstream.  Marking as MODIFIED.

Chris Lalancette

Note You need to log in before you can comment on or make changes to this bug.