* [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`?
@ 2017-07-12 9:24 Sam
2017-07-12 9:27 ` [Qemu-devel] [Qemu-discuss] " Vincenzo Romano
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sam @ 2017-07-12 9:24 UTC (permalink / raw)
To: qemu-discuss, qemu-devel
hi all,
I'm running `qemu-system-x86_64 ...` to start a guest vm. Now I want to
stop and destroy this vm, I found there is no `qemu-stop` related command,
so I have to `kill -9` this process.
How could I stop `qemu-system-x86_64` instead of `kill -9`? Use `virsh`
command or something?
Thank you~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Qemu-discuss] How to stop `qemu-system-x86_64 ...` instead of `kill -9`?
2017-07-12 9:24 [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`? Sam
@ 2017-07-12 9:27 ` Vincenzo Romano
2017-07-12 9:37 ` [Qemu-devel] " Peter Xu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vincenzo Romano @ 2017-07-12 9:27 UTC (permalink / raw)
To: Sam; +Cc: qemu-discuss, qemu-devel
2017-07-12 11:24 GMT+02:00 Sam <batmanustc@gmail.com>:
> hi all,
>
> I'm running `qemu-system-x86_64 ...` to start a guest vm. Now I want to
> stop and destroy this vm, I found there is no `qemu-stop` related command,
> so I have to `kill -9` this process.
>
> How could I stop `qemu-system-x86_64` instead of `kill -9`? Use `virsh`
> command or something?
>
> Thank you~
I hate virsh/libvirt.
I use the qemu monitor commands via SSH.
See http://download.qemu.org/qemu-doc.html#pcsys_005fmonitor
--
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`?
2017-07-12 9:24 [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`? Sam
2017-07-12 9:27 ` [Qemu-devel] [Qemu-discuss] " Vincenzo Romano
@ 2017-07-12 9:37 ` Peter Xu
2017-07-12 10:31 ` [Qemu-devel] [Qemu-discuss] " Fam Zheng
2017-07-12 11:34 ` [Qemu-devel] " Philippe Mathieu-Daudé
3 siblings, 0 replies; 5+ messages in thread
From: Peter Xu @ 2017-07-12 9:37 UTC (permalink / raw)
To: Sam; +Cc: qemu-discuss, qemu-devel
On Wed, Jul 12, 2017 at 05:24:40PM +0800, Sam wrote:
> hi all,
>
> I'm running `qemu-system-x86_64 ...` to start a guest vm. Now I want to
> stop and destroy this vm, I found there is no `qemu-stop` related command,
> so I have to `kill -9` this process.
>
> How could I stop `qemu-system-x86_64` instead of `kill -9`? Use `virsh`
> command or something?
"virsh destroy $name"? Or "quit" in qemu QMP/HMP?
(I'd say I use kill a lot, especially when I'm using -nographic)
--
Peter Xu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Qemu-discuss] How to stop `qemu-system-x86_64 ...` instead of `kill -9`?
2017-07-12 9:24 [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`? Sam
2017-07-12 9:27 ` [Qemu-devel] [Qemu-discuss] " Vincenzo Romano
2017-07-12 9:37 ` [Qemu-devel] " Peter Xu
@ 2017-07-12 10:31 ` Fam Zheng
2017-07-12 11:34 ` [Qemu-devel] " Philippe Mathieu-Daudé
3 siblings, 0 replies; 5+ messages in thread
From: Fam Zheng @ 2017-07-12 10:31 UTC (permalink / raw)
To: Sam; +Cc: qemu-discuss, qemu-devel
On Wed, 07/12 17:24, Sam wrote:
> hi all,
>
> I'm running `qemu-system-x86_64 ...` to start a guest vm. Now I want to
> stop and destroy this vm, I found there is no `qemu-stop` related command,
> so I have to `kill -9` this process.
If you have a "monitor", send "quit" command is the right way. The simplest type
of monitor (HMP on your console) is with the option "-monitor stdio".
Even without monitors, SIGKILL is likely overkill. QEMU responds to SIGTERM and
SIGINT more gracefully.
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`?
2017-07-12 9:24 [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`? Sam
` (2 preceding siblings ...)
2017-07-12 10:31 ` [Qemu-devel] [Qemu-discuss] " Fam Zheng
@ 2017-07-12 11:34 ` Philippe Mathieu-Daudé
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-07-12 11:34 UTC (permalink / raw)
To: Sam; +Cc: qemu-discuss, qemu-devel, Vincenzo Romano, Peter Xu, Fam Zheng
Hi Sam,
On 07/12/2017 06:24 AM, Sam wrote:
> I'm running `qemu-system-x86_64 ...` to start a guest vm. Now I want to
> stop and destroy this vm, I found there is no `qemu-stop` related command,
> so I have to `kill -9` this process.
>
> How could I stop `qemu-system-x86_64` instead of `kill -9`? Use `virsh`
> command or something?
If you are using -nographic you can use the "^a x" keys sequence as
described in the man page:
$ man qemu-system-x86_64
QEMU(1)
During emulation, if you are using a character backend
multiplexer (which is the default if you are using -nographic)
then several commands are available via an escape sequence.
These key sequences all start with an escape character, which
is Ctrl-a by default, but can be changed with -echr. The list
below assumes you're using the default.
Ctrl-a h
Print this help
Ctrl-a x
Exit emulator
Ctrl-a c
Rotate between the frontends connected to the multiplexer
(usually this switches between the monitor and the console)
What I usually does when the guest supports ACPI is enter the monitor
with "^a c" then type "system_powerdown" so my guest gracefully
shutdowns, else use "^a x".
Regards,
Phil.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-12 11:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 9:24 [Qemu-devel] How to stop `qemu-system-x86_64 ...` instead of `kill -9`? Sam
2017-07-12 9:27 ` [Qemu-devel] [Qemu-discuss] " Vincenzo Romano
2017-07-12 9:37 ` [Qemu-devel] " Peter Xu
2017-07-12 10:31 ` [Qemu-devel] [Qemu-discuss] " Fam Zheng
2017-07-12 11:34 ` [Qemu-devel] " Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).