-
Bug
-
Resolution: Unresolved
-
Normal
-
rhel-9.6
-
qemu-kvm-9.1.0-24.el9
-
Yes
-
Critical
-
2
-
rhel-virt-storage
-
ssg_virtualization
-
14
-
14
-
5
-
False
-
False
-
-
Yes
-
virt-storage Sprint 4, virt-storage Sprint 6
-
Pass
-
Automated
-
Known Issue
-
-
Done
-
Unspecified
-
Unspecified
-
Unspecified
-
-
x86_64
-
None
What were you trying to do that didn't work?
--migrate-disks-detect-zeroes doesn't take effect for disk migration
Please provide the package NVR for which the bug is seen:
libvirt-10.10.0-7.el9.x86_64
qemu-kvm-9.1.0-15.el9.x86_64
kernel-5.14.0-569.el9.x86_64
How reproducible is this bug?:
100%
Steps to reproduce:
1. Set up migration env and start vm on src host with a disk. # qemu-img create -f raw /var/lib/libvirt/images/raw.img 1G Formatting '/var/lib/libvirt/images/raw.img', fmt=raw size=1073741824 # virsh edit vm1 <disk type='file' device='disk'> <driver name='qemu' type='raw' /> <source file='/var/lib/libvirt/images/raw.img'> </source> <target dev='sda' bus='scsi'/> </disk> # virsh start vm1 2. Mount sda and create a file in guest. # mkfs.xfs /dev/sda # dd if=/dev/random of=/dev/sda bs=1048576 count=100 100+0 records in 100+0 records out 104857600 bytes (105 MB, 100 MiB) copied, 0.471111 s, 223 MB/s 3. Check the current disk usage on src host. # qemu-img info /var/lib/libvirt/images/raw.img -U image: /var/lib/libvirt/images/raw.img file format: raw virtual size: 1 GiB (1073741824 bytes) disk size: 168 MiB ... 4. Create a disk on the target host. # qemu-img create -f raw /var/lib/libvirt/images/raw.img 1G # qemu-img info /var/lib/libvirt/images/raw.img -U image: /var/lib/libvirt/images/raw.img file format: raw virtual size: 1 GiB (1073741824 bytes) disk size: 1 MiB ... 5. Create migratable xml. # virsh dumpxml vm1 --migratable > mig.xml # vim mig.xml ... <disk type='file' device='disk'> <driver name='qemu' type='raw' /> <source file='/var/lib/libvirt/images/raw.img'> </source> <target dev='sda' bus='scsi'/> </disk> ... 6. Migrate vm with --migrate-disks-detect-zeroes option. # virsh migrate vm1 qemu+tcp://targethost/system --verbose --live --p2p --copy-storage-all --xml mig.xml --migrate-disks-detect-zeroes sda Migration: [100.00 %] 7. Check disk usage on target host. # qemu-img info /var/lib/libvirt/images/raw.img -U image: /var/lib/libvirt/images/raw.img file format: raw virtual size: 1 GiB (1073741824 bytes) disk size: 1 GiB ...
Expected results:
Can retain sparsity with option --migrate-disks-detect-zeroes.
Actual results:
--migrate-disks-detect-zeroes doesn't take effect.
Additional info:
Tested the following combinations:
disk format on src host disk format on target host test result rbd/raw/qcow2 + rbd FAIL rbd/raw/qcow2 + raw FAIL rbd/raw/qcow2 + qcow2 PASS
- is cloned by
-
RHEL-88435 --migrate-disks-detect-zeroes doesn't take effect for disk migration [rhel-10.1]
-
- Release Pending
-
- is related to
-
RHEL-83015 Disk size of target raw image is full allocated when doing mirror with default discard value [rhel-9.7]
-
- Release Pending
-
- links to
-
RHBA-2025:147368 qemu-kvm bug fix and enhancement update