QEMU info

anyboo發表於2024-09-12

How to connect to running qemu instance with qemu monitor

Prefer to do this is to connect to the QEMU "monitor" via a UNIX socket.

When you start QEMU, add the -monitor parameter as follows:

$ qemu-system-x86_64 [..other params..] -monitor unix:qemu-monitor-socket,server,nowait

$ netstat | grep qemu-monitor-socket
b07c1a8d21e459991 stream  0  0 b07c1a8d1de32c19  0  0 qemu-monitor-socket

$ socat -,echo=0,icanon=0 unix-connect:qemu-monitor-socket
QEMU 9.1.0 monitor - type 'help' for more information

References:

connect-to-running-qemu-instance-with-qemu-monitor

QEMU/Monitor

socat(1) - Linux man page

相關文章