Bug 582005

Summary: libvirt: media eject/connect appears to work, but fails
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: berrange, bill-bugzilla.redhat.com, clalance, crobinso, itamar, jforbes, soeren.grunewald, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.7.7-4.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-28 17:58:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
machine definition none

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.