Bug 434928 - File-backed CDROM virtual disk images cannot be hot-swapped
Summary: File-backed CDROM virtual disk images cannot be hot-swapped
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-26 11:30 UTC by Michel Lind
Modified: 2008-12-21 08:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-21 08:27:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michel Lind 2008-02-26 11:30:38 UTC
Description of problem:
virt-manager does not seem to have the functionality for hot-swapping a
file-backed CDROM device. This is necessary if, say, a multi-CD installation
program is running on the guest machine

Version-Release number of selected component (if applicable):
0.5.3-2.fc9.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Add a file-based virtual disk, target type CDROM
2. Start guest
3. Try "Disconnect" or "Remove"
  
Actual results:
"Disconnect" fails with this cryptic message:

Error Removing CDROM: virDomainAttachDevice () failed only CDROM disk devices 
can be attached

is "Disconnect" meant only for physical disk devices? In which case it should 
be greyed out.

Removing yields an error from the underlying libvirt:
virDomainDetachDevice() failed this function is not supported by the 
hypervisor: virDomainDetachDevice

(using QEMU-KVM with WinXP SP2 guest)



Expected results:
Disconnect should do the right thing. I checked the libvir list and the libvir-
0.4.0 release notes and both seem to indicate that libvirt itself /does/ 
support CDROM media change?

http://www.mail-archive.com/libvir-list@redhat.com/msg03549.html

Additional info:

Comment 1 Daniel Berrangé 2008-02-26 13:02:44 UTC
The disconnect button is the one intended for doing media changes. The 'Remove'
button removes the entire virtual, but will fail because QEMU doesn't do device
hotplug (yet).

Please can you attach the virt-manager log file from
/root/.virt-manager/virt-manager.log and the QEMU logfile from
/var/log/libvirt/qemu/{VM NAME}.log that matches your guest VM


Comment 2 Michel Lind 2008-02-28 05:15:13 UTC
Nothing showed up in both log that corresponds to the disconnect request.

Also, the error message is only shown if the virtual machine is running. If it's
not running, disconnect does nothing (which means that to change the CDROM
setting, one has to remove it first and then add it back. Annoying).



Comment 3 Cole Robinson 2008-02-29 21:20:08 UTC
There seems to be two bugs here. One is that connect/disconnect of cd media from
a shutoff qemu guest doesn't appropriately raise an error. The other issue is
what is causing the (unraised) error. The first is definitely a virt-manager
issue, not sure yet about the second.

Comment 4 Cole Robinson 2008-03-04 19:00:48 UTC
The lower level issue is that virt-manager is passing xml to libvirt that it
isn't expecting.

https://bugzilla.redhat.com/show_bug.cgi?id=435966

Comment 5 Cole Robinson 2008-03-13 14:51:25 UTC
Error reporting for cdrom media insert/eject should now be more useful:

http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=191b7b0e2f21
http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=4d2416cd81ec

The underlying error is now fixed in libvirt as well (see bug 435966). All these
changes are only upstream, so if you want to verify the fix, you'll have to
build from source. This libvirt issue will be in f9 though, so cd insert and
eject should just work.

Comment 6 Bug Zapper 2008-05-14 05:38:44 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Fedora Update System 2008-12-01 18:10:13 UTC
virt-manager-0.6.0-0.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-0.fc9

Comment 8 Fedora Update System 2008-12-01 18:22:51 UTC
virt-manager-0.6.0-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-1.fc9

Comment 9 Fedora Update System 2008-12-03 01:29:39 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 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-newkey update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-10705

Comment 10 Fedora Update System 2008-12-21 08:26:40 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 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.