How to quit the QEMU monitor when not using a GUI?
Ctrl-A X
For -nographic
just enter:
Ctrl-A X
which means
- first press Ctrl + A (A is just key a, not the alt key),
- then release the keys,
- afterwards type X.
Alternatively:
enter the QEMU monitor with
Ctrl-A C
and then runquit
. See also: https://stackoverflow.com/questions/14165158/how-to-switch-to-qemu-monitor-console-when-running-with-cursesuse the QEMU monitor (same as
Ctral-A C
) withtelnet
:qemu-system-x86_64 -monitor telnet::45454,server,nowait -serial mon:stdio
and on a host terminal:
telnet localhost 45454
and then
quit
from there.-serial mon:stdio
is required to keep Ctrl+C working: https://stackoverflow.com/questions/49716931/how-to-run-qemu-with-nographic-and-monitor-but-still-be-able-to-send-ctrlc-to/49751144#49751144powerdown
from a guest shell if you are able. This does not work for all machines however: https://stackoverflow.com/questions/31990487/how-to-cleanly-exit-qemu-after-executing-bare-metal-program-without-user-interve
Tested in Ubuntu 17.10, QEMU 2.10.1.
To close a QEMU process in your shell:
ctrl+a
, then x
Press Cntl-Alt-2
and then use the close button on the menu.
You can find more useful shortcuts here