Received: from eggs.gnu.org ([2001:4830:134:3::10]:35127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7QaO-0007MG-TK for qemu-devel@nongnu.org; Thu, 17 Nov 2016 12:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7QaK-0007I2-Sx for qemu-devel@nongnu.org; Thu, 17 Nov 2016 12:34:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51888) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7QaK-0007H3-My for qemu-devel@nongnu.org; Thu, 17 Nov 2016 12:34:52 -0500 References: <6c0fc6ddc028e24c7e4d5ec409f53d99@wh-stuttgart.net> <0d2646292539552ddd4f4a5fd2f8ea9b@wh-stuttgart.net> From: John Snow Message-ID: Date: Thu, 17 Nov 2016 12:34:50 -0500 MIME-Version: 1.0 In-Reply-To: <0d2646292539552ddd4f4a5fd2f8ea9b@wh-stuttgart.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QMP event on reboot when -no-reboot is set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dirk Braunschweiger , qemu-devel@nongnu.org On 11/17/2016 03:17 AM, Dirk Braunschweiger wrote: > On 2016-11-16 17:29, John Snow wrote: >> On 11/16/2016 09:01 AM, Dirk Braunschweiger wrote: >>> Hey Guys, >>> >>> I want to get a qmp event when the qemu does a shutdown due to the >>> -no-reboot flag. Looking at the code I realized that the -no-reboot flag >>> just changes any reset request to a shutdown request. >>> Does anybody already patched qemu to emit some kind of reboot event to >>> the qmp socket? >>> >>> If no one already patched it, would you accept such a patch? Or is a >>> non-wanted feature? >>> >>> Best regards, >>> Dirk Braunschweiger >>> >> >> Is the existing "STOP" event insufficient for some reason? Is it >> important to distinguish between a 'real' stop and a stop that was >> originally intended to be a reboot? >> >> If you can elaborate on that case, you have a good chance of amending >> the event spec to add some new events. >> >> --js > > > Hi John, > > the stop event is not sufficient. I want to restart the VM if the guest > initiates a reboot. The user of the VM expects that the VM is startet > again after he/she clicks on reboot ;) > I want to use the --no-reboot flag to stop qemu and restart it on > another vm host or to start it with another configuration (more/less > RAM/CPU, a bigger HDD, etc...) > > Best regards, > Dirk > Is there also a reason why live migrating the VM is undesirable and you want to wait for a perceived more opportune moment? Regardless; what you might consider doing is amending the "STOP" event to include a new optional parameter, like "reason" or so that can include some extra information about why a VM was stopped. One of those reasons can be an intercepted --no-reboot event; maybe REASON=INTERCEPTED_REBOOT as a suggestion. --js