like socat or curl ?
thanks .
like socat or curl ?
thanks .
That won’t work, Incus is always connected to that socket and the socket isn’t multi-threaded. In general, you really shouldn’t directly try to connect to anything in there.
# qemu [...] -qmp unix:./qmp-sock,server,wait=off
# qmp-shell ./qmp-sock
I guess incus also use qmp protocol , rt ? what is the difference with qmp socket and monitor socket .
thanks stgraber
qemu.monitor is a control mode server endpoint using the socket backend chardev backend (non-blocking, single connection).
Incus always keeps a connection to that and uses it to send/receive QMP JSON messages.
What I do when debugging QEMU instances over their monitor is that I declare a second monitor in QEMU, then connect to it with socat. On my setup, I need to add an apparmor exception for the monitor:
raw.apparmor: /tmp/monitor rw,
raw.qemu: -qmp unix:/tmp/monitor,server,nowait
The socat connection is simply a matter of socat - unix-connect:/tmp/monitor
, then a capability negotiation by sending to the monitor {"execute": "qmp_capabilities"}
.
If you’re not doing any kind of low-level development on the QEMU driver in Incus, I strongly advise against talking to the monitor, as you can break things in lots of non-trivial ways (and we probably won’t be giving any support here ).
Great idea , thank you so much Benjamin. I just have some interest about how it works