Bug 434928 - File-backed CDROM virtual disk images cannot be hot-swapped
File-backed CDROM virtual disk images cannot be hot-swapped
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-26 06:30 EST by Michel Alexandre Salim
Modified: 2008-12-21 03:27 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-21 03:27:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Michel Alexandre Salim 2008-02-26 06:30:38 EST
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 Berrange 2008-02-26 08:02:44 EST
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 Alexandre Salim 2008-02-28 00:15:13 EST
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 16:20:08 EST
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 14:00:48 EST
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 10:51:25 EDT
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 01:38:44 EDT
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 13:10:13 EST
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 13:22:51 EST
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-02 20:29:39 EST
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 03:26:40 EST
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.