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

The guest will shut off after snapshot-revert guest to non-file disk status

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.4
    • libvirt
    • None
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • 5
    • False
    • Hide

      None

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

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

      The guest will shut off unexpectedly when snapshot-revert guest to non-file disk status.
      In addition, the error message for volume disk is unclear: error: unsupported configuration: cannot generate external snapshot name for disk 'vdb' without source. The error message for block disk seems to be acceptable: error: unsupported configuration: source for disk 'vdb' is not a regular file; refusing to generate external snapshot name.

      Please provide the package NVR for which bug is seen:

      libvirt-10.0.0-6.el9_4.x86_64
      qemu-kvm-8.2.0-11.el9_4.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1. Prepare a scsi pool.
      # virsh pool-dumpxml iscsi_pool
      <pool type='iscsi'>
        <name>iscsi_pool</name>
        <uuid>f9207d17-44ed-43f9-84d1-228afb8a7710</uuid>
        <capacity unit='bytes'>3221225472</capacity>
        <allocation unit='bytes'>3221225472</allocation>
        <available unit='bytes'>0</available>
        <source>
          <host name='127.0.0.1' port='3260'/>
          <device path='iqn.2021-04.com.virtemulated:emulated-iscsi.target'/>
        </source>
        <target>
          <path>/dev/disk/by-path</path>
        </target>
      </pool>
      # virsh pool-list --all
       Name         State      Autostart
      ------------------------------------
      ......
       iscsi_pool   active     no

      2. Prepare a running guest with a volume disk.
      # virsh dumpxml avocado-vt-vm1 --xpath //disk
      ......
            <disk type='volume' device='disk'>
              <driver name='qemu' type='qcow2'/>
               <source pool='iscsi_pool' volume='unit:0:0:0' mode='host'/>
              <target dev='vdb' bus='virtio'/>
              <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
            </disk>
      # virsh list --all
       Id   Name             State
      --------------------------------
       4    avocado-vt-vm1   running

      3. Create 2 snapshots.
      # virsh snapshot-create-as avocado-vt-vm1 snap1 --memspec snapshot=external,file=/tmp/mem.snap1 --diskspec vdb,file=/tmp/test.snap1 --diskspec vda,snapshot=no
      Domain snapshot snap1 created
      # virsh snapshot-create-as avocado-vt-vm1 snap2 --memspec snapshot=external,file=/tmp/mem.snap2 --diskspec vdb,file=/tmp/test.snap2 --diskspec vda,snapshot=no
      Domain snapshot snap2 created
      # virsh snapshot-list avocado-vt-vm1
       Name    Creation Time               State
      ----------------------------------------------
       snap1   2024-03-28 23:29:18 -0400   running
       snap2   2024-03-28 23:29:50 -0400   running

      4. Revert snapshot to snap1.
      # virsh snapshot-revert avocado-vt-vm1 snap1
      error: Failed to revert snapshot snap1
      error: unsupported configuration: cannot generate external snapshot name for disk 'vdb' without source
      # virsh list --all
       Id   Name             State
      ---------------------------------
       -    avocado-vt-vm1   shut off

      Expected results

      Got a clear unsupported configuration clear message and the guest is still running

      Actual results

      The unsupported configuration error message is not clear and the guest changes to shut off unexpectedly.

      Additional info:
      avocado-vt-vm1.log: 
      2024-03-29 04:30:06.517+0000: 501345: info : virObjectUnref:378 : OBJECT_UNREF: obj=0x7f50b40280e0
      char device redirected to /dev/pts/3 (label charserial0)
      2024-03-29 04:31:00.213+0000: shutting down, reason=from snapshot

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

                Created:
                Updated: