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
I think there no additional work required on qemu side. They already report the live disk snapshot capabilities: if qemu supports the blockdev-snapshot-sync command, it supports the snapshots too. In fact, that's the command to make a snapshot. One can list supported command by running 'query-commands' - that's how libvirt check some capabilities too. So let's export this in libvirt (bug 1081032).
(In reply to Michal Privoznik from comment #1) > I think there no additional work required on qemu side. They already report > the live disk snapshot capabilities: if qemu supports the > blockdev-snapshot-sync command, it supports the snapshots too. In fact, > that's the command to make a snapshot. One can list supported command by > running 'query-commands' - that's how libvirt check some capabilities too. > So let's export this in libvirt (bug 1081032). Yes you are 100% right. In the subject line I should probably had to mention that this was referring to the QEMU hypervisor support in libvirt. Sorry about that.
(In reply to Francesco Romani from comment #2) > (In reply to Michal Privoznik from comment #1) > > I think there no additional work required on qemu side. They already report > > the live disk snapshot capabilities: if qemu supports the > > blockdev-snapshot-sync command, it supports the snapshots too. In fact, > > that's the command to make a snapshot. One can list supported command by > > running 'query-commands' - that's how libvirt check some capabilities too. > > So let's export this in libvirt (bug 1081032). > > Yes you are 100% right. In the subject line I should probably had to mention > that this was referring to the QEMU hypervisor support in libvirt. > Sorry about that. Heck, I'm sorry - I misread that this bug is against qemu while in fact it's against libvirt. However, it is upstream bug, where I've just pushed your patches: 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 They are going to be part of the next release. So I'm closing this one as the request is fulfilled.