Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-77955

Overlay file can't be removed when reverting from external to internal snapshot [RHEL-10]

    • No
    • Low
    • rhel-sst-virt-tools
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      Overlay file can't be removed when reverting from external to internal snapshot

      This bug is from https://issues.redhat.com/browse/RHEL-75154.

      What is the impact of this issue to you?

      Corner case

      Please provide the package NVR for which the bug is seen:

      libvirt-10.10.0-5.el10.x86_64
      qemu-kvm-9.1.0-13.el10.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Prepare a running q35 guest.
      # virsh dumpxml rhel --xpath //os
      <os>
        <type arch="x86_64" machine="pc-q35-rhel9.4.0">hvm</type>
        <boot dev="hd"/>
      </os>
      2. Create an internal snapshot and an external snapshot.
      # virsh snapshot-create-as rhel s1
      Domain snapshot s1 created 
      # virsh snapshot-create-as rhel s2 --memspec file=/tmp/rhel.s2,snapshot=external
      Domain snapshot s2 created
      # virsh dumpxml rhel --xpath //disk
      <disk type="file" device="disk">
        <driver name="qemu" type="qcow2"/>
        <source file="/var/lib/libvirt/images/rhel.s2" index="2"/>
        <backingStore type="file" index="1">
          <format type="qcow2"/>
          <source file="/var/lib/libvirt/images/rhel.qcow2"/>
          <backingStore/>
        </backingStore>
        <target dev="vda" bus="virtio"/>
        <alias name="virtio-disk0"/>
        <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
      </disk>
      3. Revert snapshot to the internal snapshot.
      # virsh snapshot-revert rhel s1
      Domain snapshot s1 reverted
      # virsh dumpxml rhel --xpath //disk
      <disk type="file" device="disk">
        <driver name="qemu" type="qcow2"/>
        <source file="/var/lib/libvirt/images/rhel.qcow2" index="1"/>
        <backingStore/>
        <target dev="vda" bus="virtio"/>
        <alias name="virtio-disk0"/>
        <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
      </disk>
      4. Delete the external snapshot.
      # virsh snapshot-delete rhel s2
      Domain snapshot s2 deleted
      5. Check the snapshot related images. 
      # ll /var/lib/libvirt/images/rhel.
      rhel.qcow2  rhel.s2    

      Expected results

      The overlay file rhel.s2 need to be removed 

      Actual results

      The overlay file rhel.s2 still exists.

              phrdina@redhat.com Pavel Hrdina
              rhn-support-meili Meina Li
              Pavel Hrdina Pavel Hrdina
              Meina Li Meina Li
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: