]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: command: Don't format image properties for empty -drive
authorPeter Krempa <pkrempa@redhat.com>
Tue, 15 Jan 2019 16:28:21 +0000 (17:28 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 21 Jan 2019 16:04:26 +0000 (17:04 +0100)
commitf80eae8c2ae0c62ecaa550ab6353cf871bb17d4e
treed1721616eed1241749242f737d8b71f0a9f36b3d
parenta641e044c1294984979199fefbb9a9c928f7708a
qemu: command: Don't format image properties for empty -drive

If a -drive has no image, using image properties makes qemu whine that
they should not be used.

This patch stops formating cache/readonly/... for empty drives
for the pre-blockdev syntax. Unfortunately those parameters can't be
added later when inserting media, but on the other hand qemu will start
with an empty drive.

Since we already were able to start a VM with such config previously due
to qemu ignoring them I've opted just to skip formatting them.
Additionally with -blockdev support it will work as expected as the
image properties will be formatted when adding the image itself which is
not possible without it.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1651457

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/disk-cdrom.args
tests/qemuxml2argvdata/disk-cdrom.x86_64-2.12.0.args
tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args