Description of problem: For luks file. should refuse to boot a running image. Currently, The latest qemu-kvm allow to boot twice at the same time. Version-Release number of selected component (if applicable): qemu-kvm-5.0.0-2.module+el8.3.0+7379+0505d6ca.x86_64 qemu-img-5.0.0-2.module+el8.3.0+7379+0505d6ca.x86_64 How reproducible: always Steps to Reproduce: 1. Boot a luks image #/usr/libexec/qemu-kvm -device virtio-scsi-pci,id=virtio_scsi_pci0 -blockdev node-name=file_image1,driver=file,aio=threads,filename=/home/rhel830-64-virtio-scsi.luks,cache.direct=on,cache.no-flush=off VNC server running on ::1:5900 2.Boot same luks image again # /usr/libexec/qemu-kvm -device virtio-scsi-pci,id=virtio_scsi_pci0 -blockdev node-name=file_image1,driver=file,aio=threads,filename=/home/rhel830-64-virtio-scsi.luks,cache.direct=on,cache.no-flush=off VNC server running on ::1:5901 3. Actual results: qemu-kvm allow to boot twice Expected results: should refuse to boot twice Additional info:
As pervious qemu-kvm verision(qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64) is good. so set this bug as regression.
Tested with qcow2 format, it works well. Versions: kernel-4.18.0-222.el8.x86_64 qemu-kvm-5.0.0-2.module+el8.3.0+7379+0505d6ca (1/1) Host_RHEL.m8.u3.product_av.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.3.0.x86_64.io-github-autotest-qemu.qemu_img_lock.reject_boot_same_img_twice.q35: PASS (52.35 s)
It's a regression, set the priority to high.
Patch posted upstream. https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05682.html
Patch commited upstream, commit ID 662d0c5392a272aa0357aa7205e77fa3ca89c316
Tested with qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901, not hit this issue. So set status to VERIFIED. Versions: kernel-4.18.0-232.el8.x86_64 qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901 (1/1) Host_RHEL.m8.u3.product_av.luks.virtio_scsi.up.virtio_net.Guest.RHEL.8.3.0.x86_64.io-github-autotest-qemu.qemu_img_lock.reject_boot_same_img_twice.q35: PASS (1284.95 s)
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 (virt:8.3 bug fix and enhancement update), 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-2020:5137