Bug 1977155
Summary: | Snapshot deletion fails for shutoff VM when the disk is using the pool/volume format for local directories. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | YunmingYang <yunyang> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
libvirt sub component: | General | QA Contact: | yisun |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | unspecified | CC: | jdenemar, kkoukiou, lmen, mpitt, skobyda, virt-maint, wshi, xchen, xuzhang, ymao |
Version: | 9.0 | Keywords: | AutomationTriaged, Triaged |
Target Milestone: | beta | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.7.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 12:45:04 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: | 7.7.0 |
Embargoed: |
Description
YunmingYang
2021-06-29 05:30:26 UTC
Also here is the pool xml: <pool type='dir'> <name>images</name> <uuid>b7a629b9-c21e-4367-bc9d-3045d29799f7</uuid> <capacity unit='bytes'>75125227520</capacity> <allocation unit='bytes'>6457651200</allocation> <available unit='bytes'>68667576320</available> <source> </source> <target> <path>/var/lib/libvirt/images</path> <permissions> <mode>0711</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:virt_image_t:s0</label> </permissions> </target> </pool> Fixed upstream by: commit 97e4fb3c106fe38c1440e762014390a9821a4d69 Author: Peter Krempa <pkrempa> Date: Fri Jul 2 16:00:05 2021 +0200 qemu: snapshot: Translate 'volume' disks before attempting offline snapshot manipulation When the VM is inactive the 'virStorageSource' struct doesn't have the necessary data pointing to the actual storage. This is a problem for inactive snapshot operations on VMs which use disk type='volume'. Add the translation steps for reversion and deletion of snapshots. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1977155 Resolves: https://gitlab.com/libvirt/libvirt/-/issues/202 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Ján Tomko <jtomko> v7.6.0-310-g97e4fb3c10 [root@dell-per740xd-25 ~]# rpm -qa | grep ^libvirt-7 libvirt-7.7.0-3.el9.x86_64 1. having a shutoff vm with disk type = 'volume' [root@dell-per740xd-25 ~]# virsh vol-list images-1 Name Path ---------------------------------------------------------------------------------------------------- ... vda.qcow2 /var/lib/avocado/data/avocado-vt/images/vda.qcow2 [root@dell-per740xd-25 ~]# virsh dumpxml vm1 | awk '/<disk/,/<\/disk/' <disk type='volume' device='disk'> <driver name='qemu' type='qcow2'/> <source pool='images-1' volume='vda.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </disk> [root@dell-per740xd-25 ~]# virsh domstate vm1 shut off 2. create internal snapshot for it [root@dell-per740xd-25 ~]# virsh snapshot-create-as vm1 s1 Domain snapshot s1 created Snapshot created succesfully and can be found in qcow2 file [root@dell-per740xd-25 ~]# qemu-img info /var/lib/avocado/data/avocado-vt/images/vda.qcow2 | grep s1 -B2 Snapshot list: ID TAG VM SIZE DATE VM CLOCK ICOUNT 1 s1 0 B 2021-09-29 03:44:52 00:00:00.000 0 3. delete the snapshot [root@dell-per740xd-25 ~]# virsh snapshot-delete vm1 s1 Domain snapshot s1 deleted 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 (new packages: libvirt), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2390 |