Bug 1639499 - Cannot create external snapshots of raw block devices backed by zfs zvol
Summary: Cannot create external snapshots of raw block devices backed by zfs zvol
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-15 21:28 UTC by Niccolò Belli
Modified: 2024-12-17 12:28 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-12-17 12:28:23 UTC
Embargoed:


Attachments (Terms of Use)
libvirtd.log (1.25 MB, text/plain)
2018-10-16 09:23 UTC, Niccolò Belli
no flags Details

Description Niccolò Belli 2018-10-15 21:28:15 UTC
Description of problem:


libvirt can not create an external snapshot of a virtual machine backed by a raw block device.


How reproducible:


Steps to Reproduce:
1. snapshot-create-as ${DOMAIN} ${SNAPSHOT_NAME} --diskspec vda,snapshot=external,file=/var/lib/libvirt/snapshots/${DOMAIN}.${SNAPSHOT_NAME}.disk.qcow2 --memspec file=/var/lib/libvirt/snapshots/${DOMAIN}.${SNAPSHOT_NAME}.mem.qcow2,snapshot=external --atomic

or

2. snapshot-create-as ${DOMAIN} ${SNAPSHOT_NAME} --diskspec vda,snapshot=external,driver=raw,file=/var/lib/libvirt/snapshots/${DOMAIN}.${SNAPSHOT_NAME}.disk.qcow2 --memspec file=/var/lib/libvirt/snapshots/${DOMAIN}.${SNAPSHOT_NAME}.mem.qcow2,snapshot=external --atomic

Actual results:

1.
libvirtd[7157]: internal error: invalid job statistics type
libvirtd[7157]: Could not get stats for completed job; domain fedora29
libvirtd[7157]: internal error: unable to execute QEMU command 'transaction': Could not open '/var/lib/libvirt/snapshots/fedora29.test1.disk.qcow2': Invalid argument
libvirtd[7157]: Path '/var/lib/libvirt/snapshots/fedora29.test1.disk.qcow2' is not accessible: No such file or directory
libvirtd[7157]: Failed to teardown cgroup for disk path /var/lib/libvirt/snapshots/fedora29.test1.disk.qcow2
libvirtd[7157]: unable to set user and group to '0:0' on '/var/lib/libvirt/snapshots/fedora29.test1.disk.qcow2': No such file or directory
libvirtd[7157]: Unable to restore security label on /var/lib/libvirt/snapshots/fedora29.test1.disk.qcow2

or

2.
error: unsupported configuration: disk format 'raw' lacks backing file support

Expected results: creates an external snapshot

Additional info: the guest is a Fedora 29, but the host is Arch Linux with zfs. The raw block device is backed by a zvol. If necessary I can test it on a Fedora host as well (but not with the zfs file system).

Comment 1 Niccolò Belli 2018-10-15 21:31:14 UTC
I have no issues at all when I try to create external snapshots of VMs backed by qcow2 files.

Comment 2 Peter Krempa 2018-10-16 06:56:47 UTC
Could you please attach debug logs?

https://wiki.libvirt.org/page/DebugLogs

Comment 3 Niccolò Belli 2018-10-16 09:23:56 UTC
Created attachment 1494317 [details]
libvirtd.log

Here it is.

Comment 4 Niccolò Belli 2018-10-16 20:36:38 UTC
I've also tried with raw files and it works as well as with qcow2.
The problems seems to be with wither block devices or zfs ZVOLs.

Comment 5 Daniel Berrangé 2024-12-17 12:28:23 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.


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