Issue: qcow2: Image is corrupt; cannot be opened read/write
~]# virsh start vm2 error: Failed to start domain vm2 error: internal error: qemu unexpectedly closed the monitor: 2025-08-27T03:39:34.228948Z qemu-kvm: -drive file=/var/lib/libvirt/images/vm2.qcow2,format=qcow2,if=none,id=drive-virtio-disk0: could not open disk image /var/lib/libvirt/images/vm2.qcow2: qcow2: Image is corrupt; cannot be opened read/write
Workaround:
~]# qemu-img check -r all /var/lib/libvirt/images/vm2.qcow2 Leaked cluster 163869 refcount=1 reference=0 Repairing cluster 163869 refcount=1 reference=0 The following inconsistencies were found and repaired:
1 leaked clusters 0 corruptions
Double checking the fixed image now... No errors were found on the image. 163840/163840 = 100.00% allocated, 0.00% fragmented, 0.00% compressed clusters Image end offset: 10739318784
Issue: cdrom and floppy device hotplug isn't supported by libvirt
~]# virsh attach-disk vm2 /soft/CentOS-7-x86_64-DVD-2009.iso hdb --driver qemu --type cdrom --mode readonly error: Failed to attach disk error: internal error: No device with bus 'ide' and target 'hdb'. cdrom and floppy device hotplug isn't supported by libvirt
Issue: XFS (vda3): metadata I/O error in "xfs_buf_iodone_callback_error"
[ 334.287041] XFS (vda3): metadata I/O error in "xfs_buf_iodone_callback_error" at daddr 0x13ff6e0 len 32 error 5 [ 334.836243] blk_update_request: 993 callbacks suppressed [ 334.839413] blk_update_request: I/O error, dev vda, sector 20971704 [ 334.844636] blk_update_request: I/O error, dev vda, sector 20971712 [ 334.849579] blk_update_request: I/O error, dev vda, sector 20971744 [ 334.855046] blk_update_request: I/O error, dev vda, sector 25165504 [ 334.860136] blk_update_request: I/O error, dev vda, sector 25165536 [ 334.865183] blk_update_request: I/O error, dev vda, sector 29359296 [ 334.870404] blk_update_request: I/O error, dev vda, sector 29359328 [ 334.885488] blk_update_request: I/O error, dev vda, sector 20971704 [ 334.889038] blk_update_request: I/O error, dev vda, sector 25165504 [ 334.894376] blk_update_request: I/O error, dev vda, sector 29359296 [ 339.135292] XFS: Failing async write: 4183 callbacks suppressed [ 339.138493] XFS (vda3): Failing async write on buffer block 0xfff8e0. Retrying async write. [ 339.143453] XFS (vda3): Failing async write on buffer block 0xfff8c0. Retrying async write. [ 339.148493] XFS (vda3): Failing async write on buffer block 0x17ff4e0. Retrying async write. [ 339.154292] XFS (vda3): Failing async write on buffer block 0x17ff4c0. Retrying async write. [ 339.159837] XFS (vda3): Failing async write on buffer block 0x13ff6e0. Retrying async write. [ 339.164055] XFS (vda3): Failing async write on buffer block 0x13ff6c0. Retrying async write. [ 339.168882] XFS (vda3): Failing async write on buffer block 0xfff8b8. Retrying async write. [ 339.184288] XFS (vda3): metadata I/O error in "xlog_iodone" at daddr 0x8026a7 len 64 error 5 [ 339.189152] XFS (vda3): xfs_do_force_shutdown(0x2) called from line 1238 of file fs/xfs/xfs_log.c. Return address = ffffffffc0466810 [ 339.195251] XFS (vda3): Log I/O Error Detected. Shutting down filesystem [ 339.199252] XFS (vda3): Please umount the filesystem and rectify the problem(s)
~]# reboot -bash: reboot: command not found ~]# ls -bash: /bin/ls: Input/output erro
The root partiton xfs filesystem I/O error and has been force shutdown.
Workaround:
~]# qemu-img check -r all /var/lib/libvirt/images/vm2.qcow2 Repairing refcount block 0 is outside image ERROR could not resize image: Invalid argument ... Repairing refcount block 27 is outside image ERROR could not resize image: Invalid argument Can't get refcount for cluster 0: Invalid argument Can't get refcount for cluster 1: Invalid argument ... Can't get refcount for cluster 163880: Invalid argument Can't get refcount for cluster 163881: Invalid argument Rebuilding refcount structure Repairing cluster 1 refcount=1 reference=0 The following inconsistencies were found and repaired:
0 leaked clusters 23 corruptions
Double checking the fixed image now... No errors were found on the image. 163843/262144 = 62.50% allocated, 0.00% fragmented, 0.00% compressed clusters Image end offset: 10739777536