From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOZUD-0001Y9-0S for qemu-devel@nongnu.org; Wed, 08 Jul 2009 11:55:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOZU8-0001XP-Ej for qemu-devel@nongnu.org; Wed, 08 Jul 2009 11:55:08 -0400 Received: from [199.232.76.173] (port=56657 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOZU8-0001XM-AJ for qemu-devel@nongnu.org; Wed, 08 Jul 2009 11:55:04 -0400 Received: from mx1.redhat.com ([66.187.233.31]:60411) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOZU7-0003Ph-TG for qemu-devel@nongnu.org; Wed, 08 Jul 2009 11:55:04 -0400 Date: Wed, 8 Jul 2009 16:54:53 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH][RESEND] Add monitor command for system_reboot Message-ID: <20090708155453.GS26640@redhat.com> References: <20090707192631.GQ11590@us.ibm.com> <20090708075601.GJ28046@redhat.com> <4A549990.2060205@us.ibm.com> <4A54A77D.2060400@redhat.com> <20090708141058.GQ26640@redhat.com> <4A54B848.8060605@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Anthony Liguori , Ryan Harper , Avi Kivity , Gleb Natapov , "qemu-devel@nongnu.org" On Wed, Jul 08, 2009 at 04:47:46PM +0100, Stefano Stabellini wrote: > On Wed, 8 Jul 2009, Avi Kivity wrote: > > On 07/08/2009 05:10 PM, Daniel P. Berrange wrote: > > >>> Indeed. This is what has kept me from applying this but I just can't > > >>> think of any better solution. > > >>> > > >>> Any ideas? > > >>> > > >>> The drive behind implementing this feature is so that we can implement > > >>> a proper virDomainReboot in libvirt. > > >>> > > >>> > > >> How does Xen hvm implement it? > > >> > > > > > > You have to install the Xen paravirt drivers, so Xen HVM handles graceful > > > shutdown/reboot in the same way as pure Xen paravirt. They watch a flag > > > in xenstore and invoke shutdown -r / -h according to the flag. > > > > > > > What happens if the driver is not installed? The guest just keeps > > going, right? > > > > There are ways to detect if the guest has pv drivers installed or not, > if they are present soft shutdown/reboot is available; if they are > not installed soft shutdown/reboot is not available. Having the drivers installed though, still doesn't guarentee that the guest will honour the operation :-) Both graceful shutdown & reboot are just *requests* by the host admin, which cannot be expected to work all the time, it is just best effort. The admin can choose to forcably destroy a VM if it didn't honour their request to shutdown/reboot. Similarly this is all the libvirt APIs for shutdown/reboot define for semantics - best effort, not a firm guarentee. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|