Bug 496537 - RFE: QEMU reboot: Support graceful reboot of qemu/kvm guests
Summary: RFE: QEMU reboot: Support graceful reboot of qemu/kvm guests
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
: 505719 524779 (view as bug list)
Depends On: 503184
Blocks: 495479 541851 libvirtTodoHV
TreeView+ depends on / blocked
 
Reported: 2009-04-20 00:50 UTC by Itamar Reis Peixoto
Modified: 2011-07-07 14:31 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-07 14:31:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Itamar Reis Peixoto 2009-04-20 00:50:54 UTC
Description of problem:

I receive this error when I press shutdown button

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 523, in reboot_domain
    vm.reboot()
  File "/usr/share/virt-manager/virtManager/domain.py", line 569, in reboot
    self.vm.reboot(0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 392, in reboot
    if ret == -1: raise libvirtError ('virDomainReboot() failed', dom=self)
libvirtError: this function is not supported by the hypervisor: virDomainReboot



Version-Release number of selected component (if applicable):

qemu-0.10-8.fc11.x86_64
virt-manager-0.7.0-4.fc11.x86_64


Expected results:


I like to be able to power off and reset a virtual machine using shutdown button, without receiving error message.

Comment 1 Mark McLoughlin 2009-04-20 13:09:39 UTC
Yep, this is a known issue:

http://www.redhat.com/archives/libvir-list/2008-October/msg00168.html

Moving to upstream bugtracker

Comment 2 Mark McLoughlin 2009-05-11 10:02:12 UTC
Ryan Harper posted a patch to add the qemu side of this:

  http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00450.html

Comment 3 Mark McLoughlin 2009-06-03 16:45:01 UTC
Okay, moving back to Fedora/rawhide and putting on F12VirtTarget

Comment 4 Daniel Berrangé 2009-06-15 10:27:44 UTC
*** Bug 505719 has been marked as a duplicate of this bug. ***

Comment 5 Mark McLoughlin 2009-08-07 11:36:28 UTC
AFAICT, the conclusion from upstream was that libvirt should do system_powerdown followed by polling via info status followed by system_reset

Comment 6 Mark McLoughlin 2009-10-02 09:22:45 UTC
*** Bug 524779 has been marked as a duplicate of this bug. ***

Comment 7 Dustin Kirkland 2010-04-26 22:45:59 UTC
Any update on the status of this bug?  The discussion on the Ubuntu dupe [1] of this bug has been lively, lately.

We're curious if libvirt might simply implement "reboot" by sending "ctrl-alt-delete" to the guest.  It seems that most Linux and Windows operating systems will handle ctrl-alt-delete as a warm reboot fairly consistently.

Comment 8 Dustin Kirkland 2010-04-26 22:46:48 UTC
Any update on the status of this bug?  The discussion on the Ubuntu dupe [1] of this bug has been lively, lately.

We're curious if libvirt might simply implement "reboot" by sending "ctrl-alt-delete" to the guest.  It seems that most Linux and Windows operating systems will handle ctrl-alt-delete as a warm reboot fairly consistently.

[1] https://bugs.launchpad.net/bugs/368962

Comment 9 Daniel Berrangé 2010-04-28 13:13:01 UTC
I most/many Windows,  Ctrl-Alt-Delete is a shortcut to bring up the login dialog, not reboot, so its not really viable.

Comment 10 Dustin Kirkland 2010-04-28 14:20:47 UTC
Bummer.  I guess it's really been that long since I used Windows.  I swear ctrl-alt-delete used to reboot Windows...

Comment 11 Daniel Berrangé 2010-04-28 14:27:20 UTC
Win 3.1 & Win 95/98/XP derivatives treat it as a reboot. Win NT and 2k, 2k3, 2k8, Vista, 7,  derivatives treat it as a logon signal.

http://en.wikipedia.org/wiki/Control-Alt-Delete#Windows

Comment 12 Daniel Berrangé 2011-07-07 14:31:06 UTC
commit 42f43592be3045bed5dabdaea65718f6d2c706e4
Author: Daniel P. Berrange <berrange>
Date:   Wed Jun 15 17:49:58 2011 +0100

    Support reboots with the QEMU driver
    
    For controlled shutdown we issue a 'system_powerdown' command
    to the QEMU monitor. This triggers an ACPI event which (most)
    guest OS wire up to a controlled shutdown. There is no equiv
    ACPI event to trigger a controlled reboot. This patch attempts
    to fake a reboot.


Note You need to log in before you can comment on or make changes to this bug.