Description of problem: I tried adding a floppy disk device to an existing VM in virt-manager but it failed with the following error: Unable to complete install '<type 'exceptions.NameError'> global name 'libvirtError' is not defined Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 530, in add_device self.vm.add_device(xml) File "/usr/share/virt-manager/virtManager/domain.py", line 684, in add_device except libvirtError, e: NameError: global name 'libvirtError' is not defined Version-Release number of selected component (if applicable): virt-manager-0.5.2-2.fc8 libvirt-0.4.0-3.fc8 How reproducible: Tried several times with the same result Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Please re-test with virt-manager 0.5.3-1.fc8 available from updates-testing - it should fix this issue.
Just done that, having re-started virt-manager and it appeared to finish but then there was an error message: Unable to complete install: 'Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 513, in add_device self.vm.add_device(xml) File "/usr/share/virt-manager/virtManager/domain.py", line 729, in add_device raise RuntimeError, "Unable to attach device to live guest, libvirt reported error:\n" + device_exception RuntimeError: Unable to attach device to live guest, libvirt reported error: virDomainAttachDevice() failed only CDROM disk devices can be attached ' Does this mean I need to restart the VM?
I shutdown the VM and a floppy device had been created. However, I was then unable to start the VM in virt-manager. The error is: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/engine.py", line 472, in run_domain vm.startup() File "/usr/share/virt-manager/virtManager/domain.py", line 379, in startup self.vm.create() File "/usr/lib64/python2.5/site-packages/libvirt.py", line 240, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: virDomainCreate() failed QEMU quit during console startup qemu: could not open floppy disk image '/dev/disk/by-id/usb-Y-E_DATA_USB_Floppy_Drive' This error relates to device fdb, as I tried creating another floppy device, but using a different method of referring to the 'real' device. The mention of a 'floppy disk image' is odd, as it's not an image, but a USB floppy drive.
I've just tried adding a USB flash drive as a device, and received a related error: Unable to complete install: 'Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 513, in add_device self.vm.add_device(xml) File "/usr/share/virt-manager/virtManager/domain.py", line 724, in add_device self.get_connection().define_domain(newxml) File "/usr/share/virt-manager/virtManager/connection.py", line 446, in define_domain self.vmm.defineXML(xml) File "/usr/lib64/python2.5/site-packages/libvirt.py", line 601, in defineXML if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self) libvirtError: virDomainDefineXML() failed Invalid harddisk device name: sda ' The mention of 'sda' is odd as the device I tried to add was '/dev/sdj'. If you'd prefer I report this as a separate bug, let me know.
The usb issue seems seperate. Please file a different bug, and specify if the guest is running or shutdown, whether using qemu/kvm or xen, and exactly what input you are using that triggers the issue. Thanks!
In response to comment #3: I tried to reproduce this but had no luck. That error is what you should see if qemu can not find the specified floppy path. Could you try and reproduce this, and make sure that the path is still present after the failure? If you still get the error, attach ~/.virt-manager/virt-manager.log and virsh dumpxml <domnam> to this bz.
I opened a seperate bug for the scsi issue (bz 434871), which is now fixed upstream. Setting this bug to needinfo with regards to the info requested of comment #3.
Have just been able to reproduce it, when using /dev/sdd as the device (it's a USB external floppy drive): Unable to complete install: 'Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 513, in add_device self.vm.add_device(xml) File "/usr/share/virt-manager/virtManager/domain.py", line 729, in add_device raise RuntimeError, "Unable to attach device to live guest, libvirt reported error:\n" + device_exception RuntimeError: Unable to attach device to live guest, libvirt reported error: virDomainAttachDevice() failed only CDROM disk devices can be attached '
Created attachment 297593 [details] Virt-manager logfile
When I try virsh dumpxml XP2, the response is: error: failed to connect to hypervisor It's a KVM guest.
This error is actually expected behavior. For a qemu/kvm guest, the only devices that can actually be manipulated on a live guest are cdroms, and only for connect or disconnecting an individual disk. The error message is certainly unclear though, and virt-manager in general needs some better way to handle attaching devices to live guests, either outright denying it or giving some message like "This device will be available after the next reboot". For dumpxml, try virsh --connect qemu:///system dumpxml XP2 (this issue will be fixed in the next virt-manager release). However the xml isn't really neccessary since it is in the log file you posted. I'm still interest in comment #3, since that is an error I can't reproduce. My guess is the device was disconnect from your machine when you tried to boot the guest, the guest couldn't find the device and bombed, which is fine. But if you can reproduce, please explain.
Re. https://bugzilla.redhat.com/show_bug.cgi?id=429485#c3 - yes, it's the guest refusing to boot when the USB floppy drive is disconnected. In this case I think your idea of a message indicating that a guest reboot is necessary for the device to be available is a good idea.
Okay! I've finally fixed this upstream: http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=935f3b243a91 If the guest is running and the user attempts to connect a device which is not hotpluggable, a warning will pop up saying something like "This change will only take affect on the next reboot". Error reporting and general interaction for this operations is a lot better as well. Setting to POST. Thanks, Cole
This message is a reminder that Fedora 8 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 8. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '8'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 8's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 8 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This stuff is a bit too invasive for F8, so moving this bug to F9. This will be fixed in the next update.
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
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
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
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.