From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] system_powerdown via acpi power button Date: Thu, 24 Jan 2008 14:41:59 +0200 Message-ID: <47988797.8040208@qumranet.com> References: <20080103181132.GA1077@bogon.ms20.nix> <4795C134.7030400@siemens.com> <20080122114955.GA28335@bogon.ms20.nix> <4795DD9C.3040804@siemens.com> <20080124123730.GA4527@bogon.ms20.nix> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Jan Kiszka To: Guido Guenther Return-path: In-Reply-To: <20080124123730.GA4527-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Guido Guenther wrote: > If the guest can't do that, it simply can't. You can then SIGTERM the > guest after a timeout. Note that even an acpi system might not be able > to shut down since it hangs on a network unmount or it ignores the ACPI > interrupt via kernel commandline or whatever. You can't ever expect a > system to shutdown cleanly, so you need the SIGTERM failsave anyway. > Have a look at e.g. domainShutdown() vs. domainDestroy() in libvirt. > Agree, but should try a "quit" monitor command first. Signals are racy, like anything that deals with pids (qemu dies, another process is fork()ed with the same pid, libvirt kills it). -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/