Scratch build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=36435438 I've also already sent the backport earlier before this bug was cloned (Jirka will fix the bug link): https://mailman-int.corp.redhat.com/archives/rhvirt-patches/2021-April/msg00170.html
Test with scratch build: libvirt-7.0.0-15.el8_rc.51bc9b53a8.x86_64 qemu-kvm-5.2.0-16.module+el8.4.0+10806+b7d97207.x86_64 Test Steps: # cat test.sh #!/bin/bash DOMAIN=lmn DISK=sda TDISK="/dev/sdc" LOG_FILE="/var/log/libvirt/libvirtd.log" FIND_STR="not assigned to domain" rm -rf /tmp/$DOMAIN.s* for i in {1..100} do echo "------$i------" virsh destroy $DOMAIN virsh create $DOMAIN.xml; sleep 3; virsh snapshot-create-as $DOMAIN --disk-only --diskspec $DISK,file=/tmp/$DOMAIN.s$i; virsh blockcopy $DOMAIN $DISK $TDISK --wait --verbose; sleep 2; virsh blockjob $DOMAIN $DISK --pivot; virsh dumpxml $DOMAIN | grep /disk -B8 virsh domblkthreshold $DOMAIN $DISK 100 virsh domstats $DOMAIN --block --backing if [ `grep -c "$FIND_STR" $LOG_FILE` -ne '0' ]; then break else continue fi done # sh test.sh ...... ------100------ Domain 'lmn' destroyed Domain 'lmn' created from lmn.xml Domain snapshot 1621492378 created Block Copy: [100 %] Now in mirroring phase <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/dev/sdc' index='3'/> <backingStore/> <target dev='sda' bus='scsi'/> <alias name='scsi0-0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> Domain: 'lmn' block.count=1 block.0.name=sda block.0.path=/dev/sdc block.0.backingIndex=3 block.0.rd.reqs=1 block.0.rd.bytes=512 block.0.rd.times=94530 block.0.wr.reqs=0 block.0.wr.bytes=0 block.0.wr.times=0 block.0.fl.reqs=0 block.0.fl.times=0 block.0.allocation=1074135040 block.0.capacity=1073741824 block.0.physical=0 block.0.threshold=100
Also do the basic test with the libvirt-7.0.0-14.1.module+el8.4.0+11095+d46acebf.x86_64 and the test script in Comment 5: # sh test.sh ...... ------100------ Domain 'lmn' destroyed Domain 'lmn' created from lmn.xml Domain snapshot 1621991597 created Block Copy: [100 %] Now in mirroring phase <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='block' device='disk'> <driver name='qemu' type='qcow2'/> <source dev='/dev/sdc' index='3'/> <backingStore/> <target dev='sda' bus='scsi'/> <alias name='scsi0-0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> Domain: 'lmn' block.count=1 block.0.name=sda block.0.path=/dev/sdc block.0.backingIndex=3 block.0.rd.reqs=1 block.0.rd.bytes=512 block.0.rd.times=92180 block.0.wr.reqs=0 block.0.wr.bytes=0 block.0.wr.times=0 block.0.fl.reqs=0 block.0.fl.times=0 block.0.allocation=1074135040 block.0.capacity=1073741824 block.0.physical=2147483648 block.0.threshold=100 Both the auto test and the manual test were passed. So move this bug to be verified.
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:av bug fix 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-2021:2202