From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRS7z-00040z-4f for qemu-devel@nongnu.org; Thu, 16 Jul 2009 10:40:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRS7u-0003un-Dn for qemu-devel@nongnu.org; Thu, 16 Jul 2009 10:40:06 -0400 Received: from [199.232.76.173] (port=44271 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRS7u-0003ud-2I for qemu-devel@nongnu.org; Thu, 16 Jul 2009 10:40:02 -0400 Received: from mail2.shareable.org ([80.68.89.115]:57571) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRS7t-00038B-Ds for qemu-devel@nongnu.org; Thu, 16 Jul 2009 10:40:01 -0400 Date: Thu, 16 Jul 2009 15:39:59 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH][RESEND] Add monitor command for system_reboot Message-ID: <20090716143959.GC16461@shareable.org> References: <20090707192631.GQ11590@us.ibm.com> <20090708075601.GJ28046@redhat.com> <4A549990.2060205@us.ibm.com> <20090708132623.GN26640@redhat.com> <4A54A367.3010603@us.ibm.com> <20090708135607.GO26640@redhat.com> <20090708154349.GT11590@us.ibm.com> <4A54C308.8060307@redhat.com> <20090716085843.GA14243@amit-x200.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090716085843.GA14243@amit-x200.redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Anthony Liguori , Ryan Harper , Avi Kivity , Gleb Natapov , qemu-devel@nongnu.org Amit Shah wrote: > On (Wed) Jul 08 2009 [19:02:16], Avi Kivity wrote: > > On 07/08/2009 06:43 PM, Ryan Harper wrote: > >>> That suffers from the same problem as a system_reboot command in that > >>> the guest may never start the shutdown. If that's an acceptable > >>> limitation, then we might as well implement it directly in QEMU as > >>> system_reboot so its easily available to everyone. Make 'system_reboot' > >>> take an optional timeout arg (default to 60 seconds) after which it > >>> cancels its plans. > >>> > >> > >> This seems the most reasonable thing to me. As already mentioned, > >> system_powerdown already is non-deterministic since the guest could > >> ignore the ACPI event. > >> > > > > It could also send the guest to sleep or initiate the self destruct > > sequence. I don't think we should press the power button unless the > > user explicitly asked us to. This means we'll need a guest agent like > > Xen. > > This is another use-case for vmchannel (or virtio-serial) where the user > exists within qemu. What happens then the guest is non-responsive because it crashed, or the agent isn't working, or the guest doesn't support virtio? Some way to override the guest is needed for all reboot/powerdown options. "kill -9 $(pidof kvm)" is really unacceptable, but I've had to do it on several occasions unfortunately. Ideally, an option to those commands "--force" to ignore the guest and just do it, and an option like "--timeout-force=5" to behave like holding down the power button on a real computer. (It would be nice to be able to change the value of -no-shutdown and -no-reboot from the monitor, too.) -- Jamie