]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: validate: Reject empty USB disks
authorPeter Krempa <pkrempa@redhat.com>
Fri, 16 Aug 2024 14:34:49 +0000 (16:34 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 21 Aug 2024 13:49:36 +0000 (15:49 +0200)
commit62d6e8dcb2ebf99953ad00a671fb4d8bd6c15fdc
tree4649eb20a5a8e66e2eb3256eda505568cc5a3bc1
parent204013d4aa95e6843ae2ef01f9e59c57cf77db1c
qemu: validate: Reject empty USB disks

Attempting to start qemu with or hotplug an empty 'usb-storage' based
disk results in the following error:

 qemu-system-x86_64: -device {"driver":"usb-storage","bus":"usb.0","port":"2","id":"usb-disk1","removable":true}: drive property not set

Reject such config at validation step and adjust tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_validate.c
tests/qemuxmlconfdata/disk-cdrom-bus-other.x86_64-latest.args
tests/qemuxmlconfdata/disk-cdrom-bus-other.x86_64-latest.xml
tests/qemuxmlconfdata/disk-cdrom-bus-other.xml
tests/qemuxmlconfdata/disk-cdrom-usb-empty.x86_64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/disk-cdrom-usb-empty.xml [new file with mode: 0644]
tests/qemuxmlconftest.c