Bug 1149667 - libvirt misreport live snapshot capability
Summary: libvirt misreport live snapshot capability
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: Unspecified
OS: Linux
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
Keywords: ZStream
Depends On:
Blocks: 1149460 1150428 1150609
TreeView+ depends on / blocked
Reported: 2014-10-06 12:36 UTC by Francesco Romani
Modified: 2019-04-28 09:34 UTC (History)
33 users (show)

In Red Hat Enterprise Linux 6.6, support was added for libvirt to report whether QEMU is capable of creating snapshots. However, libvirt did not probe for the snapshot capability properly. As a consequence, the snapshot capability of KVM Guest Image in VDSM was reported as unavailable even when it was available, and creating a disk snapshot in some cases failed. With this update, libvirt no longer reports QEMU snapshot capability, and therefore does not cause the described problem.
Clone Of: 1149460
: 1150609 (view as bug list)
Last Closed: 2015-07-22 05:47:44 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1252 normal SHIPPED_LIVE libvirt bug fix update 2015-07-20 17:50:06 UTC
Red Hat Bugzilla 1081032 None None None Never

Internal Trackers: 1081032

Description Francesco Romani 2014-10-06 12:36:16 UTC
+++ This bug was initially created as a clone of Bug #1149460 +++

Description of problem:
rhel-guest-image-7.0-20140930.0.el7 snapshot fails while running over couple of RHEL6.6.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.First of all you have to disable selinux on both your RHEL6.6 hosts with setenforce 0.
2.Now try executing live snapshot from running guest-image VM on some RHEL6.6 host.
3.Snapshhot, fails...

Actual results:
PSA (please see attachments).

Expected results:
Snapshot should pass.

Additional info:
logs attached.

--- Additional comment from Francesco Romani on 2014-10-06 05:31:09 EDT ---

I checked locally on the box (in read only mode, so no harm is possible).

VDSM indeed reports that live snapshot is not supported. This causes the engine to prohibit the operation as shown. This is expected and the wanted behaviour.

# vdsClient -s 0 getVdsCaps | grep -i snapshot
	liveSnapshot = 'false'

However, VDSM is acting as middleman here. Let's check what libvirt reports:

# virsh -r capabilities | grep -i snapshot
      <disksnapshot default='off' toggle='no'/>
      <disksnapshot default='off' toggle='no'/>

And this is the reason why it fails.
Now, that's either libvirt or qemu issue.

--- Additional comment from Francesco Romani on 2014-10-06 05:38:12 EDT ---

Seems libvirt issue.

Still on the affected box:

# telnet localhost 4444
Trying ::1...
Connected to localhost.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 1, "minor": 12, "major": 0}, "package": "(qemu-kvm-rhev-"}, "capabilities": []}}
{ "execute": "qmp_capabilities" }
{"return": {}}
{ "execute": "query-commands" }
{"return": [{"name": "quit"}, {"name": "eject"}, {"name": "__com.redhat_drive_del"}, {"name": "change"}, {"name": "screendump"}, {"name": "__com.redhat_qxl_screendump"}, {"name": "stop"}, {"name": "cont"}, {"name": "system_wakeup"}, {"name": "system_reset"}, {"name": "system_powerdown"}, {"name": "device_add"}, {"name": "device_del"}, {"name": "cpu"}, {"name": "memsave"}, {"name": "pmemsave"}, {"name": "inject-nmi"}, {"name": "migrate"}, {"name": "migrate_cancel"}, {"name": "migrate_set_speed"}, {"name": "client_migrate_info"}, {"name": "dump-guest-memory"}, {"name": "query-dump-guest-memory-capability"}, {"name": "migrate_set_downtime"}, {"name": "block_resize"}, {"name": "netdev_add"}, {"name": "netdev_del"}, {"name": "transaction"}, {"name": "blockdev-snapshot-sync"}, {"name": "__com.redhat_drive-mirror"}, {"name": "__com.redhat_drive-reopen"}, {"name": "balloon"}, {"name": "set_link"}, {"name": "getfd"}, {"name": "closefd"}, {"name": "block_passwd"}, {"name": "block_set_io_throttle"}, {"name": "set_password"}, {"name": "expire_password"}, {"name": "__com.redhat_set_password"}, {"name": "__com.redhat_spice_migrate_info"}, {"name": "qmp_capabilities"}, {"name": "human-monitor-command"}, {"name": "__com.redhat_drive_add"}, {"name": "block-stream"}, {"name": "__com.redhat_block-commit"}, {"name": "block-job-set-speed"}, {"name": "block-job-cancel"}, {"name": "chardev-add"}, {"name": "chardev-remove"}, {"name": "query-events"}, {"name": "query-pci"}, {"name": "query-version"}, {"name": "query-commands"}, {"name": "query-chardev"}, {"name": "query-block"}, {"name": "query-blockstats"}, {"name": "query-cpus"}, {"name": "query-kvm"}, {"name": "query-status"}, {"name": "query-mice"}, {"name": "query-vnc"}, {"name": "query-spice"}, {"name": "query-name"}, {"name": "query-uuid"}, {"name": "query-migrate"}, {"name": "query-balloon"}, {"name": "query-block-jobs"}]}

"blockdev-snapshot-sync" command is reported, thus the disk snapshot should be advertised as supported.

Comment 6 Ján Tomko 2014-10-07 14:59:28 UTC
As Peter Krempa found out, this was caused by an incomplete backport for bug 1081032. The disksnapshot capability was only reported if the "blockdev-snapshot-sync" QMP commands was found, however in RHEL-6 we only probe for QMP commands on domain startup.

Comment 8 Ján Tomko 2014-10-07 15:10:54 UTC
With qemu-kvm-rhev, virsh capabilities should report:
<disksnapshot default='on' toggle='no'/>
but not with qemu-kvm:
<disksnapshot default='off' toggle='no'/>

Comment 17 Shanzhi Yu 2014-12-17 08:27:14 UTC
Reproduce this with libvirt-0.10.2-46.el6.x86_64, verify with libvirt-0.10.2-47.el6.x86_64

1. with qemu-kvm-rhev + libvirt-0.10.2-46.el6.x86_64

1.1.# rpm -q libvirt qemu-kvm-rhev

# virsh  -r capabilities |grep -i  snapshot
      <disksnapshot default='off' toggle='no'/>
      <disksnapshot default='off' toggle='no'/>

2. with qemu-kvm + libvirt-0.10.2-46.el6.x86_64

2.1# rpm -q libvirt qemu-kvm
# virsh  -r capabilities |grep -i  snapshot
      <disksnapshot default='off' toggle='no'/>
      <disksnapshot default='off' toggle='no'/>

3. with qemu-kvm-rhev + libvirt-0.10.2-47.el6.x86_64

3.1# rpm -q libvirt qemu-kvm-rhev

# virsh  -r capabilities |grep -i  snapshot

4. with qemu-kvm + libvirt-0.10.2-47.el6.x86_64

4.1# rpm -q libvirt qemu-kvm-rhev

# virsh  -r capabilities |grep -i  snapshot

Comment 19 errata-xmlrpc 2015-07-22 05:47:44 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.


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