Description of problem: As subject Version-Release number of selected component (if applicable): qemu-3.0.0 or after How reproducible: 100% Steps to Reproduce: 1. Start an VM as following # qemu-kvm -drive if=none,id=drive-ide0-0-0,readonly=on,cache=none -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,write-cache=on qemu-kvm: -drive if=none,id=drive-ide0-0-0,readonly=on,cache=none: Must specify either driver or file Actual results: As above Expected results: # qemu-kvm -drive if=none,id=drive-ide0-0-0,readonly=on,cache=none -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,write-cache=on VNC server running on ::1:5900 Additional info: This will block libvirt tests: vm start in with empty cdrom. Please fix it asap. It works on qemu-2.12. It can be reproduced on scsi and sata bus, too. # qemu-kvm -drive if=none,id=drive-scsi0-0-0-0,readonly=on,cache=none -device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,write-cache=on Unable to init server: Could not connect: Connection refused qemu-system-x86_64: -drive if=none,id=drive-scsi0-0-0-0,readonly=on,cache=none: Must specify either driver or file # qemu-kvm -drive if=none,id=drive-sata0-0-0,media=cdrom,readonly=on,cache=none -device ide-cd,bus=sata0.0,drive=drive-sata0-0-0,id=sata0-0-0,write-cache=on Unable to init server: Could not connect: Connection refused qemu-system-x86_64: -drive if=none,id=drive-sata0-0-0,media=cdrom,readonly=on,cache=none: Must specify either driver or file
I can reproduce with qemu 3.0 and libvirt 4.7 in f29 as well. There's a closed RHEL qemu-kvm bug, not sure what the fix was: https://bugzilla.redhat.com/show_bug.cgi?id=1342999 But there's still an open libvirt bug for it: https://bugzilla.redhat.com/show_bug.cgi?id=1377321 I think the current state is that libvirt shouldn't be passing those options in the empty cdrom case. pkrempa is that correct?
Fixed upstream: commit f80eae8c2ae0c62ecaa550ab6353cf871bb17d4e (HEAD -> master, origin/master, origin/HEAD) Author: Peter Krempa <pkrempa> Date: Tue Jan 15 17:28:21 2019 +0100 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.
This is in rawhide libvirt nowadays