From: Wen Congyang Date: Fri, 17 Jun 2011 02:25:22 +0000 (+0800) Subject: do not reset no_shutdown after we shutdown the vm X-Git-Tag: v0.15.0-rc0~13 X-Git-Url: https://git.proxmox.com/?p=qemu.git;a=commitdiff_plain;h=e69ae5c49af45a67ebdf6a7cf465eb91b5c8ee11 do not reset no_shutdown after we shutdown the vm 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 Signed-off-by: Anthony Liguori --- diff --git a/vl.c b/vl.c index 65438b338..99d92012c 100644 --- a/vl.c +++ b/vl.c @@ -1398,7 +1398,6 @@ static void main_loop(void) monitor_protocol_event(QEVENT_SHUTDOWN, NULL); if (no_shutdown) { vm_stop(VMSTOP_SHUTDOWN); - no_shutdown = 0; } else break; }