Bug 646931 - RFE: qemu capabilities should track running qemu
Summary: RFE: qemu capabilities should track running qemu
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: libvirtTodoInternal
TreeView+ depends on / blocked
 
Reported: 2010-10-26 17:33 UTC by Eric Blake
Modified: 2011-07-07 14:37 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-07-07 14:37:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Eric Blake 2010-10-26 17:33:01 UTC
Description of problem:
If the qemu binary is upgraded (for example, via yum update), the new binary may have different capabilities than older in-memory qemu still running a domain.  This can cause crashes if libvirtd is then restarted and re-parses qemu -help output, as libvirt may end up issuing a monitor command appropriate to the new binary but unknown by the target binary.

Version-Release number of selected component (if applicable):
libvirt 0.8.5 and earlier, and any change in qemu version


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
See this list post for the suggested fix:
https://www.redhat.com/archives/libvir-list/2010-October/msg00993.html

Basically, libvirt needs to cache the qemu capabilities in effect at the time a domain is started, rather than re-querying a (possibly-changed) qemu binary later on.

Comment 1 Daniel Berrangé 2011-07-07 14:37:47 UTC
commit 43c01d38384b8fd1469f4c23dfdd407593c639f8
Author: Daniel P. Berrange <berrange>
Date:   Wed May 4 12:55:38 2011 +0100

    Persist qemu capabilities in the domain status file
    
    To cope with the QEMU binary being changed while a VM is running,
    it is neccessary to persist the original qemu capabilities at the
    time the VM is booted.
    
    * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: Add
      an enum for a string rep of every capability
    * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Support for
      storing capabilities in the domain status XML
    * src/qemu/qemu_process.c: Populate & free QEMU capabilities at
      domain startup


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