This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 582005 - libvirt: media eject/connect appears to work, but fails
libvirt: media eject/connect appears to work, but fails
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
:
: 572094 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-13 16:01 EDT by Enrico Scholz
Modified: 2010-05-28 13:58 EDT (History)
9 users (show)

See Also:
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 13:58:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Enrico Scholz 2010-04-13 16:01:00 EDT
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 16:04:29 EDT
(forget the "or USB devices" part; it is caused by SELinux denials)
Comment 2 Daniel Berrange 2010-04-15 07:15:49 EDT
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 14:13:11 EDT
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 12:14:27 EDT
*** Bug 572094 has been marked as a duplicate of this bug. ***
Comment 5 Fedora Update System 2010-05-18 15:02:46 EDT
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 15:14:24 EDT
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 13:58:29 EDT
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.