Bug #35034
openVM creation is broken with QEMU >= 6.0 (RHEL 8.6, RHEL 9 and others)
Description
since QEMU version 6.0 [1], you can't use the file block driver with block devices:
"The file block driver no longer permits use with block devices"
RHEL 8.6 ships QEMU 6.2 and is currently broken while creating VMs:
"Call to virDomainCreateWithFlags failed: internal error: process exited while connecting to monitor: 2022-06-07T08:48:59.685792Z qemu-kvm: -blockdev {"driver":"file","filename":"/dev/vg_sdb/xxxx-b-disk1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}: 'file' driver requires '/dev/vg_sdb/xxxx-b-disk1' to be a regular file"
RHEL 8.5 shipped with QEMU 4.2, so it's not affected.
The solution I found was to use "block" instead of "file". I opened a PR for fog-libvirt: https://github.com/fog/fog-libvirt/pull/116
I don't think it would break older QEMUs. I checked RHEL 6 manual and even at that they use "block" and not "file". But I assume we might have issues with real files (they won't be block devices)? so that PR might need some more love.
[1] https://wiki.qemu.org/ChangeLog/6.0#Incompatible_changes
No data to display