From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXOmm-0006za-S7 for qemu-devel@nongnu.org; Thu, 16 Jun 2011 22:27:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXOml-00033E-S9 for qemu-devel@nongnu.org; Thu, 16 Jun 2011 22:27:52 -0400 Received: from [222.73.24.84] (port=54156 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXOml-00032e-6F for qemu-devel@nongnu.org; Thu, 16 Jun 2011 22:27:51 -0400 Message-ID: <4DFABB12.4050101@cn.fujitsu.com> Date: Fri, 17 Jun 2011 10:25:22 +0800 From: Wen Congyang MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] [PATCH] do not reset no_shutdown after we shutdown the vm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , "Daniel P. Berrange" , Anthony Liguori Daniel P. Berrange sent a libvirt's patch to support reboots with the QEMU driver. He implements it in json model like this: 1. add -no-shutdown in the qemu's option: qemu -no-shutdown xxxx 2. shutdown the vm by monitor command system_powerdown 3. wait for shutdown event 4. reset the vm by monitor command system_reset no_shutdown will be reset to 0 if the vm is powered down. We only can reboot the vm once. If no_shutdown is not reset to 0, we can reboot the vm many times. Signed-off-by: Wen Congyang --- vl.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index dbdec71..e2e52ec 100644 --- a/vl.c +++ b/vl.c @@ -1396,7 +1396,6 @@ static void main_loop(void) monitor_protocol_event(QEVENT_SHUTDOWN, NULL); if (no_shutdown) { vm_stop(VMSTOP_SHUTDOWN); - no_shutdown = 0; } else break; } -- 1.7.1