Bug 646931

Summary: RFE: qemu capabilities should track running qemu
Product: [Community] Virtualization Tools Reporter: Eric Blake <eblake>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, crobinso, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-07 14:37:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 646967    

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