Bug 541623 - QEMU 0.12 won't start with disconnected CD-ROM
Summary: QEMU 0.12 won't start with disconnected CD-ROM
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F13VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-11-26 14:36 UTC by Matthew Booth
Modified: 2010-03-16 14:48 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-03-16 14:48:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthew Booth 2009-11-26 14:36:56 UTC
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 16:47:48 UTC
Thanks for the report.

Comment 2 Paul Jenner 2010-02-05 21:34:12 UTC
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 14:48:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.