Skip to content

Commit

Permalink
do not reset no_shutdown after we shutdown the vm
Browse files Browse the repository at this point in the history
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 <wency@cn.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  • Loading branch information
wencongyang authored and Anthony Liguori committed Jul 23, 2011
1 parent ea0e541 commit e69ae5c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e69ae5c

Please sign in to comment.