Red Hat Bugzilla – Full Text Bug Listing
|Summary:||virt-manager should disable unimplemented reboot option for qemu/kvm|
|Product:||[Fedora] Fedora||Reporter:||Michael Monreal <michael.monreal+bugs>|
|Component:||virt-manager||Assignee:||Cole Robinson <crobinso>|
|Status:||CLOSED ERRATA||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||12||CC:||berrange, clalance, crobinso, dominik, hbrock, jforbes, markmc, psj, rstrode, virt-maint|
|Fixed In Version:||virt-manager-0.8.3-2.fc13||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2010-04-08 23:55:47 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Michael Monreal 2009-10-31 10:22:24 EDT
Created attachment 366931 [details] Screenshot Pressing "Reboot" in the GUI of a KVM based VM leads to this: --- Error shutting down domain: this function is not supported by the hypervisor: virDomainReboot Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/engine.py", line 609, in reboot_domain vm.reboot() File "/usr/share/virt-manager/virtManager/domain.py", line 660, in reboot self.vm.reboot(0) File "/usr/lib/python2.6/site-packages/libvirt.py", line 398, in reboot if ret == -1: raise libvirtError ('virDomainReboot() failed', dom=self) libvirtError: this function is not supported by the hypervisor: virDomainReboot --- Does KVM really not support reboot? If not, can't virt-manager simply gray out this menu item?
Comment 1 Michael Monreal 2009-10-31 10:24:43 EDT
Created attachment 366932 [details] Screenshot 2 Depending on the outcome of this bug, the error window should probably be improved, e.g. not have a window title (currently "Error") and a bold headline. http://library.gnome.org/devel/hig-book/stable/windows-alert.html.en#alerts-error
Comment 2 Chris Lalancette 2009-11-02 03:21:25 EST
(In reply to comment #0) > Created an attachment (id=366931) [details] > Screenshot > > Pressing "Reboot" in the GUI of a KVM based VM leads to this: > > --- > Error shutting down domain: this function is not supported by the hypervisor: > virDomainReboot > > Traceback (most recent call last): > File "/usr/share/virt-manager/virtManager/engine.py", line 609, in > reboot_domain > vm.reboot() > File "/usr/share/virt-manager/virtManager/domain.py", line 660, in reboot > self.vm.reboot(0) > File "/usr/lib/python2.6/site-packages/libvirt.py", line 398, in reboot > if ret == -1: raise libvirtError ('virDomainReboot() failed', dom=self) > libvirtError: this function is not supported by the hypervisor: virDomainReboot > --- > > Does KVM really not support reboot? If not, can't virt-manager simply gray out > this menu item? Yeah, at present time, the Qemu/KVM driver in libvirt doesn't actually support reboot. There's an open bug about it somewhere, but it's not implemented currently. I do agree that it would be nice if virt-manager greyed out options for things it doesn't support. Chris Lalancette
Comment 3 Paul Jenner 2009-11-12 15:22:27 EST
For info, the bug for Qemu/KVM driver support for reboot is bug #496537. Does not change the point that virt-manager should grey out the option based on missing capability though.
Comment 4 Michael Monreal 2009-11-12 15:26:54 EST
(In reply to comment #3) > Does not change the point that virt-manager should grey out the option based on > missing capability though. What about the "Save" menu entry... this does not seem to work with KVM as well?
Comment 5 Cole Robinson 2009-11-15 11:41:00 EST
'save' is supported, but I believe it was busted until recently. We should only grey out options that are explicitly not implemented for a certain driver. The larger problem here is that there is no good way to determine if something is supported by a libvirt driver or not. Some functions you can just test, reboot isn't one of them. So we have to hardcode that logic into virt-manager. What happens when reboot is finally implemented for qemu + libvirt? We then need to change virt-manager in lockstep, but also detect the proper libvirt and qemu versions so we don't 'enable' the unimplemented option if run against older versions. That's an annoying road to go down, because if we get detection wrong, we may be disabling reboot support for versions that support it. We can skip adding the version detection logic, but then we essentially regress this bug for anything accept the latest and greatest libvirt + qemu combo, and it still requires commits to disable and reenable this option in virt-manager, which would then prevent any old versions of virt-manager without the reenable commit from working with latest libvirt + qemu. Crappy situation, huh? Maybe connection capabilities should export its function table for each driver, so apps can programatically determine whether a function is even implemented or not, and enable/disable things as expected. This would be very useful for virt-manager, and help solve this issue.
Comment 6 Bug Zapper 2009-11-16 09:45:43 EST
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Cole Robinson 2010-02-26 21:33:20 EST
*** Bug 560678 has been marked as a duplicate of this bug. ***
Comment 8 Cole Robinson 2010-03-17 16:51:49 EDT
I've committed a fix upstream: http://hg.fedorahosted.org/hg/virt-manager/rev/fc1360e7ded9 If we attempt a reboot and libvirt says 'not supported', we try to do it manually: request a vm.shutdown(), wait for the state to change, request a vm.startup(). Any user invoked 'shutdown' or 'destroy' will clear the reboot flag: this is how xen works, and I think it's the least confusing mode of operation. A couple use cases I can see people complaining about: - User clicks reboot, libvirt doesn't support it, so we run vm.shutdown() - VM begins shutting down, user closes virt-manager - VM is not rebooted because virt-manager isn't running, and won't remember the reboot flag between runs - User clicks reboot, libvirt doesn't support it, so we run vm.shutdown() - gnome-power-manager in the guest pops up, asking 'Do you want to shutdown, restart, log out?' - User selects 'restart'. VM does a soft restart, which to virt-manager doesn't look like a state change at all. The reboot flag is never cleared. - Later, user shuts down the VM from inside the guest, and virt-manager reboots it. User says 'WTF?' A proper reboot impl at the libvirt level could solve both (though I don't think the proper qemu events exist for the latter example at the moment), but virt-manager is stuck. Either way, I think these drawbacks aren't going to be too common, and are offset by the benefit of having some sort of reboot impl. Users are already used to shutdown related flakyness, given that linux guests usually require manual gnome-power-manager intervention when clicking shutdown anyways.
Comment 9 Fedora Update System 2010-03-22 12:33:21 EDT
virt-manager-0.8.3-2.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/virt-manager-0.8.3-2.fc13
Comment 10 Fedora Update System 2010-03-23 19:23:09 EDT
virt-manager-0.8.3-2.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 virt-manager'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/virt-manager-0.8.3-2.fc13
Comment 11 Fedora Update System 2010-04-08 23:55:22 EDT
virt-manager-0.8.3-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.