Created attachment 406337 [details]
Description of problem:
(Re)attaching cdrom disks or USB devices fails with recent libvirt/qemu combination.
| # virsh attach-disk XXX /srv/mnt/virt/iso/f10-i386.iso \
| --mode readonly --driver file --type cdrom hdc
| Disk attached successfully
the device is not accessible from within the VM:
| # mount /dev/hdc /mnt/
| mount: No medium found
An 'strace' log of qemu shows
| 20140 write(17, "\33[D\33...[D\33[Dchange
| ide0-1-0 \"/srv/mnt/virt/iso/f10-i386.iso\"\33[K", 192) = 192
| 20140 write(17, "The ide0-1-0 device has not been found\r\n", 40) = 40
qemu cmdline is
/usr/bin/qemu-kvm -S -M pc -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name XXX -uuid d5ae5e2d-66f1-575d-8ee4-27bf1973830e -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/proveo-infoman.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive if=none,media=cdrom,id=drive-ide0-1-0 -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/dev/vg01/virt-proveo-infoman,if=none,id=drive-virtio-disk0,boot=on -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -device rtl8139,vlan=0,id=net0,mac=54:52:00:09:18:92,bus=pci.0,addr=0x5 -net tap,fd=46,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:1 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
Version-Release number of selected component (if applicable):
(forget the "or USB devices" part; it is caused by SELinux denials)
This is fixed by patch 4 in this series. We used the wrong name for the eject command
This link doesn't seem to go to a patch series, but this one works:
except for the last chunk, which appears to patch a function not in the f12 virt preview version.
It fixed the problem for me, so I put my package up here:
in case anybody else is in the same boat.
I must admit, it was very slick to save the VM in the middle of a CentOS install, apply the patch, and then restore it, and continue to CD 2. Good stuff.
*** Bug 572094 has been marked as a duplicate of this bug. ***
libvirt-0.7.7-4.fc13 has been submitted as an update for Fedora 13.
libvirt-0.7.7-4.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update libvirt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/libvirt-0.7.7-4.fc13
libvirt-0.7.7-4.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.