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.

Reply via email to