RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1660572 - qemu failed to create internal snapshot via 'savevm' when using blockdev [rhel8]
Summary: qemu failed to create internal snapshot via 'savevm' when using blockdev [rhel8]
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: 8.0
Assignee: Kevin Wolf
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On: 1658981
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-18 16:32 UTC by Ademar Reis
Modified: 2019-05-22 05:05 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1658981
Environment:
Last Closed: 2019-02-15 15:41:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ademar Reis 2018-12-18 16:32:38 UTC
RHEL8 is affected as well, so cloning

+++ This bug was initially created as a clone of Bug #1658981 +++

Description of problem:
Failed to create internal snapshot on blockdev

Version-Release number of selected component (if applicable):
Host:
4.18.0-50.el8.x86_64
qemu-kvm-3.1.0-0.module+el8+2266+616cf026.next.candidate.x86_64
seabios-bin-1.11.1-2.module+el8+2173+537e5cb5.noarch

Guest:
4.18.0-51.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot a guest with blockdev
 -blockdev driver=file,cache.direct=on,cache.no-flush=off,filename=/home/rhel80-64-virtio-scsi.qcow2,node-name=drive_scsi1 \
 -blockdev driver=qcow2,node-name=drive_scsi11,file=drive_scsi1 \
 -device scsi-hd,id=image1,drive=drive_scsi11,bus=virtio_scsi_pci0.0,channel=0,scsi-id=0,lun=0,bootindex=0 \

2.Create an internal snapshot via "save_vm"
qmp:
{"execute": "human-monitor-command", "arguments": {"command-line": "savevm aa1"}, "id": "WKIXiJxb"}
{"return": "Device '' is writable but does not support snapshots\r\n", "id": "WKIXiJxb"}
same with hmp:
(qemu) info block
drive_scsi11: /home/rhel80-64-virtio-scsi.qcow2 (qcow2)
    Attached to:      image1
    Cache mode:       writeback
(qemu) savevm ab
Device '' is writable but does not support snapshots

3.

Actual results:
Failed to create internal snapshot
{"return": "Device '' is writable but does not support snapshots\r\n", "id": "WKIXiJxb"}

Expected results:
succeed to create internal snapshot

Additional info:

--- Additional comment from Ademar Reis on 2018-12-14 14:33:17 BRST ---

Is it a regression from 3.1, or does it happen with qemu-2.12 (RHEL-8.0) as well?

We're deprecating internal snapshots, but given libvirt still defaults to them in virt-manager and virsh, we'll need it clonned if it happens in RHEL8.

--- Additional comment from xianwang on 2018-12-18 01:34:29 BRST ---

(In reply to Ademar Reis from comment #1)
> Is it a regression from 3.1, or does it happen with qemu-2.12 (RHEL-8.0) as
> well?
> 
> We're deprecating internal snapshots, but given libvirt still defaults to
> them in virt-manager and virsh, we'll need it clonned if it happens in RHEL8.

Hi, 
This issue also exists on qemu-2.12 (RHEL-8.0). what's more, savevm works well for "drive", this issue is only for "blockdev".

qemu build:
4.18.0-51.el8.x86_64
qemu-kvm-2.12.0-46.module+el8+2351+e14a4632.x86_64

--- Additional comment from CongLi on 2018-12-18 04:56:54 BRST ---

Refer:
https://bugzilla.redhat.com/show_bug.cgi?id=1621944#c16

Recording from Kevin:
"""
(In reply to xianwang from comment #14)
> {"execute": "human-monitor-command", "arguments": {"command-line": "savevm
> sn_test"}, "id": "WKIXiJxb"}    
> {"return": "Device '' is writable but does not support snapshots\r\n", "id":
> "WKIXiJxb"}

I think this is a QEMU bug, though I'm not sure what the correct behaviour would be.

Currently it tries to snapshot all nodes that are either created explicitly by the user or that are root nodes of BlockBackends (e.g. attached to a guest device). User created nodes includes the driver=file node in your example, and this node doesn't support snapshots. This is obviously not useful behaviour.

Maybe the best course of action would be to restrict the snapshotting to nodes that are roots of BlockBackends. This would, however, still include root nodes of block jobs, NBD servers, etc. This won't usually result in errors like here because the affected nodes will still be format level nodes, but could still be unexpected. Another option would be to further restrict this to BlockBackends that are actually attached to a device. Also, either option would exclude explicitly created qcow2 nodes which are not attached to any BlockBackend (e.g. -blockdev without using the node name anywhere else), which may or may not be what users expect.

Another possible option: Snapshot only if it is either a BlockBackend root or doesn't have any BDS parents.
"""

Comment 2 Ademar Reis 2019-02-15 15:41:35 UTC
We're not switching to blockdev in RHEL8 yet, so I'm closing this BZ and leaving only the rhel8-av one open: bug 1658981


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