Description of problem: Should fail to define guest xml with non-virtio video devices using packed virtqueues Version-Release number of selected component (if applicable): qemu-kvm-5.2.0-3.module+el8.4.0+9499+42e58f08.x86_64 libvirt-7.0.0-2.module+el8.4.0+9520+ef609c5f.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare a guest xml with video devices using packed virtqueues # cat guest.xml ... <video> <driver packed='on'/> <model type='vga' vram='16384' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </video> ... 2. define guest xml # virsh define guest.xml Domain 'avocado-vt-vm1' defined from guest.xml 3. start the guest # virsh start avocado-vt-vm1 error: Failed to start domain 'avocado-vt-vm1' error: internal error: qemu unexpectedly closed the monitor: 2021-01-29T08:25:40.353439Z qemu-kvm: -device VGA,id=video0,vgamem_mb=16,bus=pci.8,addr=0x0,packed=on: Property 'VGA.packed' not found Expected results: As only virtio devices support packed virtqueues, it's better to fail to define or edit xml with non-virtio video devices using packed virtqueues
Patches proposed on the list: https://listman.redhat.com/archives/libvir-list/2021-March/msg00458.html
Merged upstream as: b5d25b8183 domain_validate: Move virDomainCheckVirtioOptionsAreAbsent() a few lines forward v7.1.0-250-gb5d25b8183 25d3b41e5e domain_validate: XML validate that non-virtio video devices have none virtio options v7.1.0-251-g25d3b41e5e
VERIFIED ========================== Environment: Compiled against library: libvirt 7.4.0 Using library: libvirt 7.4.0 Using API: QEMU 7.4.0 Running hypervisor: QEMU 5.2.0 xml data: ... <video> <driver packed='on'/> <model type='vga' vram='16384' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x01' function='0x0'/> </video> ... Result: # virsh define tztest_bug.xml error: Failed to define domain from tztest_bug.xml error: unsupported configuration: packed driver option is only supported for virtio devices
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 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-2021:4684