Bug 611291 - qemu: Cannot boot off host CDROM device /dev/sr0
Summary: qemu: Cannot boot off host CDROM device /dev/sr0
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: beta
: ---
Assignee: john cooper
QA Contact: Virtualization Bugs
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
Reported: 2010-07-04 18:28 UTC by Jon Masters
Modified: 2014-07-25 03:46 UTC (History)
10 users (show)

Clone Of:
Last Closed: 2010-11-19 19:40:53 UTC

Attachments (Terms of Use)

Description Jon Masters 2010-07-04 18:28:25 UTC
Description of problem:

Out of the box RHEL6 install does not attach to /dev/sr0 (CDROM) when creating a new guest to install RHEL5.5 using virt-manager. The result is that the newly created guest refuses to boot the installer and must then be halted, boot device changed, the CDROM explicitly attached to the guest, then installation begun.

Instead, the CDROM device should be attached on first install boot if desired, with a warning if it cannot be so attached.


Comment 1 Jon Masters 2010-07-04 18:29:45 UTC
This probably isn't a problem if you test using ISO image files, but the raw device does not seem to be working as intended.

Comment 3 Cole Robinson 2010-07-07 14:44:05 UTC
Please provide the output of virt-manager --debug when creating the guest, and /var/log/libvirt/qemu/<vmname>.log

Comment 4 Cole Robinson 2010-07-07 15:38:54 UTC
Tried this myself. Here's the libvirt generated command line:

/usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name cdrom-test -uuid 028c1604-f683-bbef-ffb0-ec0c5df82c88 -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/cdrom-test.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -no-reboot -boot d -drive file=/var/lib/libvirt/images/cdrom-test.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/dev/sr0,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,cache=none -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:92:21:41,bus=pci.0,addr=0x5 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc -k en-us -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

VM shows a boot error:

Boot failed: Could not read from CDROM (code 0003)
No bootable device.

Reproduced with a smaller command line:

/usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 512 -boot d -drive file=/dev/sr0,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,cache=none -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0

Reassigning to qemu.

Comment 5 Dor Laor 2010-07-12 11:30:06 UTC
What's the qemu-kvm and seabios versions? It did work for me.

Comment 7 lihuang 2010-07-31 06:36:20 UTC
I can reproduce it on 
( tested under virt-manager and command line )

install from host cdrom is ok if use CLI : -cdrom /dev/sr0

Comment 8 lihuang 2010-07-31 07:53:19 UTC
well . just found bz#608548 and the workaround bz#616480

Comment 12 john cooper 2010-11-19 19:40:53 UTC
Closing per comment above.

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