Bug 1081032

Summary: RFE: QEMU: export the live disk snapshot capabilities
Product: Red Hat Enterprise Linux 6 Reporter: Francesco Romani <fromani>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: dyuan, jdenemar, mzhan, rbalakri, shyu, tlavigne
Target Milestone: rcKeywords: FutureFeature, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.10.2-35.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1062139 Environment:
Last Closed: 2014-10-14 04:20:49 UTC Type: Bug
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: 1062139    
Bug Blocks: 1002699    

Description Francesco Romani 2014-03-26 14:18:44 UTC
+++ This bug was initially created as a clone of Bug #1062139 +++

Description of problem:
Using the QEMU hypervisor, when a live disk snapshot is requested through libvirt, the request can fail if the underyling qemu binary lacks the snapshotting support.
At the moment libvirt doesn't reports yet this information about
the hypervisor in the capabilities XML.
So, the only way to test for the live snapshot support in QEMU is to actually
request a snapshot and see what happens.

It would be nice to have this information in the capabilities XML.
A first patch addressing this issue was posted here:

https://www.redhat.com/archives/libvir-list/2014-January/msg00824.html

How reproducible:
100%


Steps to Reproduce:
1. fetch the capabilities xml for example with
# virsh -c qemu:///system capabilites

Actual results:
No mention of the live snapshot support

Expected results:
to have some information reporting if the live snapshot is available or not

Additional info:
proposed patch https://www.redhat.com/archives/libvir-list/2014-January/msg00824.html

Comment 2 Michal Privoznik 2014-03-26 15:15:28 UTC
The patches are pushed upstream already:

commit 231b63e3ca4b85a010b345e4404cec73e28b6a15
Author:     Francesco Romani <fromani>
AuthorDate: Mon Mar 17 16:19:46 2014 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed Mar 26 13:41:25 2014 +0100

    qemu: add unit tests for the capabilities xml
    
    The test is loosely inspired from qemucapabilitiestest
    and qemuxml2xmltest.
    
    Added a new test instead of extending an existing one because
    the feature being tested don't really fits nicely in any
    existing place.

commit f35e89ffc16a2ce331e28724e7653854aaf62c54
Author:     Francesco Romani <fromani>
AuthorDate: Mon Mar 17 16:19:45 2014 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed Mar 26 13:41:25 2014 +0100

    qemu: extract guest capabilities initialization
    
    This patch decouples the binary and the capabilities detection
    from the guest initialization.
    
    The purpose is to make testing easier.

commit 85a3eb8a6d44e4501c00c9aeed0039ccaf29cdc5
Author:     Francesco Romani <fromani>
AuthorDate: Mon Mar 17 16:19:44 2014 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed Mar 26 13:41:25 2014 +0100

    qemu: export disk snapshot support in capabilities
    
    This patch adds an element to QEMU's capability XML, to
    show if the underlying QEMU binary supports the live disk
    snapshotting or not.
    This allows any client to know ahead of time if the feature
    is available.
    
    Without this information available, the only way to check
    for the snapshot support is to request one and check for
    errors.
    
    Signed-off-by: Francesco Romani <fromani>

v1.2.2-376-g231b63e

Comment 6 Shanzhi Yu 2014-05-14 03:08:04 UTC
Verify this bug with libvirt-0.10.2-35.el6.x86_64.
Step as comment 0

#rpm -q libvirt
libvirt-0.10.2-35.el6.x86_64
# virsh  -c qemu:///system capabilities|grep -i snapshot
      <disksnapshot default='off' toggle='no'/>
      <disksnapshot default='off' toggle='no'/>

Comment 8 errata-xmlrpc 2014-10-14 04:20:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1374.html