This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 541623

Summary: QEMU 0.12 won't start with disconnected CD-ROM
Product: [Fedora] Fedora Reporter: Matthew Booth <mbooth>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: berrange, clalance, crobinso, itamar, jforbes, psj, veillard, virt-maint
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-16 10:48:32 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 514891    

Description Matthew Booth 2009-11-26 09:36:56 EST
Description of problem:
If a guest has a CD drive but no backing file, libvirt outputs the following on the QEMU command line:

-drive file=,if=ide,media=cdrom,index=2,format=raw

QEMU 0.11 creates a CD drive with no media. QEMU 0.12 as of 63e86b2e refuses to start, reporting:

qemu: could not open disk image : No such file or directory

Version-Release number of selected component (if applicable):
libvirt-0.7.4-1.fc12.x86_64
QEMU built from git 63e86b2e

How reproducible:
Always

Steps to Reproduce:
1. Change emulator to point to latest qemu
2. 'Disconnect' CD-ROM drive in virt-manager gui
3. Start domain
  
Actual results:
Fails with: qemu: could not open disk image : No such file or directory

Expected results:
Works as before.

Additional info:
Comment 1 Justin M. Forbes 2009-12-01 11:47:48 EST
Thanks for the report.
Comment 2 Paul Jenner 2010-02-05 16:34:12 EST
Looks to be fixed in at least libvirt-0.7.6-1.fc12.x86_64 from F12+virt-preview as I have the same setup and cannot replicate.

[root@localhost qemu]# rpm -q libvirt qemu-system-x86
libvirt-0.7.6-1.fc12.x86_64
qemu-system-x86-0.12.2-5.fc12.x86_64

virsh dumpxml extract for guest before disconnecting cdrom:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/home/vms/install-media/Fedora-12-x86_64-DVD.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>

Boots with qemu args including:

-drive file=/home/vms/install-media/Fedora-12-x86_64-DVD.iso,if=none,media=cdrom,id=drive-ide0-1-0,format=raw

Disconnect the cdrom in virt-manager as above. virsh dumpxml extract now gives:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>

Still boots fine with qemu args including:

-drive if=none,media=cdrom,id=drive-ide0-1-0,format=raw
Comment 3 Cole Robinson 2010-03-16 10:48:32 EDT
My guess is this was a transient bug in upstream qemu, since this is working fine for me with F12. Closing as WORKSFORME. mbooth, please reopen if you are still seeing this issue.