Bug 582005 - libvirt: media eject/connect appears to work, but fails
Summary: libvirt: media eject/connect appears to work, but fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 572094 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-13 20:01 UTC by Enrico Scholz
Modified: 2010-05-28 17:58 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.7.7-4.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-28 17:58:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
machine definition (2.48 KB, text/xml)
2010-04-13 20:01 UTC, Enrico Scholz
no flags Details

Description Enrico Scholz 2010-04-13 20:01:00 UTC
Created attachment 406337 [details]
machine definition

Description of problem:

(Re)attaching cdrom disks or USB devices fails with recent libvirt/qemu combination.

E.g. after

| # 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):

qemu-0.12.3-6.fc13.x86_64
libvirt-0.7.7-1.fc13.x86_64


How reproducible:

100%

Comment 1 Enrico Scholz 2010-04-13 20:04:29 UTC
(forget the "or USB devices" part; it is caused by SELinux denials)

Comment 2 Daniel Berrangé 2010-04-15 11:15:49 UTC
This is fixed by patch 4 in this series. We used the wrong name for the eject command

https://www.redhat.com/archives/libvir-list/2010-April/msg00688.html

Comment 3 Bill McGonigle 2010-04-29 18:13:11 UTC
This link doesn't seem to go to a patch series, but this one works:

http://libvirt.org/git/?p=libvirt.git;a=commitdiff_plain;h=c4896d378b921ba6471562d7b17641be121c19d6;hp=db336caa581fedbc729f4e177fa858968564db86

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:
  http://swdist.bfccomputing.com/fedora/bfc/12/

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.

Comment 4 Cole Robinson 2010-05-18 16:14:27 UTC
*** Bug 572094 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2010-05-18 19:02:46 UTC
libvirt-0.7.7-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libvirt-0.7.7-4.fc13

Comment 6 Fedora Update System 2010-05-19 19:14:24 UTC
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

Comment 7 Fedora Update System 2010-05-28 17:58:29 UTC
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.


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