From 7228f75ac74c896417fb8c5ba3d375a14ed4d36b Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 28 Feb 2018 06:31:28 +0000 Subject: [PATCH] Update QEMU text mode behaviour description --- README.adoc | 60 ++++++++++++++++++----------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/README.adoc b/README.adoc index cfc9799..30291d9 100644 --- a/README.adoc +++ b/README.adoc @@ -189,11 +189,7 @@ Show serial console directly on the current terminal, without opening a QEMU win ./run -n .... -To exit, just do a regular: - -.... -poweroff -.... +To quit QEMU forcefully, just use Ctrl + C as usual. This mode is very useful to: @@ -201,44 +197,28 @@ This mode is very useful to: * copy and paste commands and stdout output to / from host * have a large scroll buffer, and be able to search it, e.g. by using GNU `screen` on host -If the system crashes and you can't can quit QEMU with `poweroff`, or if `poweroff` is just too slow for your patience, you can hard kill the VM with - -.... -Ctrl-C X -.... - -or: - -.... -Ctrl-C A -quit -.... - -or on host: - -.... -./qemumonitor -quit -.... - -or: - -.... -echo quit | ./qemumonitor -.... - -See also: - -* http://stackoverflow.com/questions/14165158/how-to-switch-to-qemu-monitor-console-when-running-with-curses -* https://superuser.com/questions/1087859/how-to-quit-qemu-monitor -* https://superuser.com/questions/488263/problems-switching-to-qemu-control-panel-with-nographics -* https://superuser.com/questions/1087859/how-to-quit-the-qemu-monitor-when-not-using-a-gui/1211516#1211516 - Limitations: -* TODO: Ctrl + C kills the emulator for some setups (TODO which what exactly?), and not sent to guest processes. See: -** https://github.com/cloudius-systems/osv/issues/49 +* TODO: Ctrl + C kills the emulator, and not sent to guest processes. See: ++ +-- ** https://unix.stackexchange.com/questions/167165/how-to-pass-ctrl-c-in-qemu +** https://github.com/cloudius-systems/osv/issues/49 +-- ++ +It is also hard to enter the monitor for the same reason: +-- +* http://stackoverflow.com/questions/14165158/how-to-switch-to-qemu-monitor-console-when-running-with-curses +* https://superuser.com/questions/488263/how-to-switch-to-the-qemu-control-panel-with-nographics +-- ++ +Our workaround is: ++ +.... +./qemumonitor +.... ++ +I think the problem was reversed in older QEMU versions: https://superuser.com/questions/1087859/how-to-quit-the-qemu-monitor-when-not-using-a-gui/1211516#1211516 + This is however fortunate when running QEMU with GDB, as the Ctrl + C reaches GDB and breaks. * Very early kernel messages such as `early console in extract_kernel` only show on the GUI, since at such early stages, not even the serial has been setup.