]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Properly handle setting of <iotune> for empty cdrom
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Jan 2021 11:06:32 +0000 (12:06 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Jan 2021 08:24:48 +0000 (09:24 +0100)
commitd0819b9f02ba39a178d16c28df7ca0e3e066f28b
treea71e31c1c8baeb98d7659916b2ab4b98b7b1686b
parent3b364c6509db4ff643bdde3f8c5cd620304e64b4
qemu: Properly handle setting of <iotune> for empty cdrom

When starting a VM with an empty cdrom which has <iotune> configured the
startup fails as qemu is not happy about setting tuning for an empty
drive:

 error: internal error: unable to execute 'block_set_io_throttle', unexpected error: 'Device has no medium'

Resolve this by skipping the setting of throttling for empty drives and
updating the throttling when new medium is inserted into the drive.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/111
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_hotplug.c
src/qemu/qemu_process.c