Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1651458

Summary: Fail to start an VM with empty CDROMs
Product: Red Hat Enterprise Linux 8 Reporter: Han Han <hhan>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: amit, berrange, cfergeau, chayang, coli, dwmw2, dyuan, extras-qa, hhan, itamar, juzhang, meili, michen, pbonzini, rbalakri, rjones, virt-maint, virt-maint, xuzhang
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1651457 Environment:
Last Closed: 2018-11-20 08:09:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1651457    
Bug Blocks:    

Description Han Han 2018-11-20 07:03:50 UTC
Qemu-kvm version:
qemu-kvm-3.0.0-2.module+el8+2208+e41b12e0.x86_64

+++ This bug was initially created as a clone of Bug #1651457 +++

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

Comment 1 CongLi 2018-11-20 07:29:31 UTC
Based on:
Bug 1377321 - libvirt should not pass image specific parameters (cache, AIO) to empty cdrom drives
https://bugzilla.redhat.com/show_bug.cgi?id=1598618#c6


Han han,

Could you please take a look of those bugs?
In qemu, you could remove cache option in the testing.

I prefer close this bug if you agree with that.

Thanks.

Comment 2 Han Han 2018-11-20 08:09:16 UTC
(In reply to CongLi from comment #1)
> Based on:
> Bug 1377321 - libvirt should not pass image specific parameters (cache, AIO)
> to empty cdrom drives
> https://bugzilla.redhat.com/show_bug.cgi?id=1598618#c6
> 
> 
> Han han,
> 
> Could you please take a look of those bugs?
> In qemu, you could remove cache option in the testing.
> 
> I prefer close this bug if you agree with that.
> 
> Thanks.

Well, it works without cache=none... I think it is duplicated.

*** This bug has been marked as a duplicate of bug 1598618 ***