Bug 427147

Summary: kvm cannot gracefully shut down
Product: [Fedora] Fedora Reporter: Pierre Ossman <pierre-bugzilla>
Component: kvmAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 8CC: avi, berrange, clalance, jhutar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-22 02:22:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pierre Ossman 2008-01-01 12:41:46 UTC
I have a Fedora 8 host running a Fedora 8 guest using KVM. It seems to be
running fine for all I can tell, but there is no external way of shutting down
the guest gracefully. A SIGTERM and SIGKILL seem to have the same effect, i.e.
killing the machine instantly. I've also tried virsh shutdown (which seems to
just do a SIGTERM from a casual glance at the code).

I might be doing something wrong as this is my first foray into KVM, but all
documentation seem to suggest that a SIGTERM should initiate a graceful shutdown
of the guest.

Comment 1 Avi Kivity 2008-03-07 18:03:39 UTC
use the qemu monitor system_powerdown command to send an acpi shutdown request 
to the guest.  you can easily redirect the monitor to a unix domain socket or 
a tcp port for scripting.

Comment 2 Jan Hutař 2008-04-21 07:53:28 UTC
Is this a duplicate of a bug 439970?

Comment 3 Pierre Ossman 2008-04-21 09:29:08 UTC
Not directly, no. But they are related. Bug 439970 seems to be that you've added
the functionality requested here (I haven't tested in a while), but it isn't
working.

Symptom here is a hard shutdown when a soft one is requested. In the other bug
there's no action at all.

Comment 4 Daniel Berrangé 2008-04-22 02:22:35 UTC
The version of KVM in Fedora 8 does not support graceful shutdown. This is a new
feature introduced in the KVM version distributed from Fedora 9 onwards.


Comment 5 Pierre Ossman 2008-04-22 05:25:16 UTC
So you're saying that F8 won't be getting kernel updates to 2.6.25?

Comment 6 Avi Kivity 2008-04-22 09:37:29 UTC
It's a userspace feature, implemented in qemu.

Comment 7 Pierre Ossman 2008-04-22 19:27:13 UTC
Quite right. So the same question but for the kvm package then. :)