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?
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
(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
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.
(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?
'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.
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
*** Bug 560678 has been marked as a duplicate of this bug. ***
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.
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
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
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.
*** Bug 624195 has been marked as a duplicate of this bug. ***