mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
docs/interop: Delete qmp-intro.txt
qmp-intro.txt is quite small and provides very little information that isn't already in the documentation elsewhere. Fold the example command lines into qemu-options.hx, and delete the now-unneeded plain text document. While we're touching the qemu-options.hx documentation text, wordsmith it a little bit and improve the rST formatting. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230515162245.3964307-4-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
8a85b8ec3d
commit
0ec4468f23
2 changed files with 22 additions and 94 deletions
|
@ -1,88 +0,0 @@
|
|||
QEMU Machine Protocol
|
||||
=====================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
The QEMU Machine Protocol (QMP) allows applications to operate a
|
||||
QEMU instance.
|
||||
|
||||
QMP is JSON[1] based and features the following:
|
||||
|
||||
- Lightweight, text-based, easy to parse data format
|
||||
- Asynchronous messages support (ie. events)
|
||||
- Capabilities Negotiation
|
||||
|
||||
For detailed information on QMP's usage, please, refer to the following files:
|
||||
|
||||
o qmp-spec.txt QEMU Machine Protocol current specification
|
||||
o qemu-qmp-ref.html QEMU QMP commands and events (auto-generated at build-time)
|
||||
|
||||
[1] https://www.json.org
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
You can use the -qmp option to enable QMP. For example, the following
|
||||
makes QMP available on localhost port 4444:
|
||||
|
||||
$ qemu [...] -qmp tcp:localhost:4444,server=on,wait=off
|
||||
|
||||
However, for more flexibility and to make use of more options, the -mon
|
||||
command-line option should be used. For instance, the following example
|
||||
creates one HMP instance (human monitor) on stdio and one QMP instance
|
||||
on localhost port 4444:
|
||||
|
||||
$ qemu [...] -chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \
|
||||
-chardev socket,id=mon1,host=localhost,port=4444,server=on,wait=off \
|
||||
-mon chardev=mon1,mode=control,pretty=on
|
||||
|
||||
Please, refer to QEMU's manpage for more information.
|
||||
|
||||
Simple Testing
|
||||
--------------
|
||||
|
||||
To manually test QMP one can connect with telnet and issue commands by hand:
|
||||
|
||||
$ telnet localhost 4444
|
||||
Trying 127.0.0.1...
|
||||
Connected to localhost.
|
||||
Escape character is '^]'.
|
||||
{
|
||||
"QMP": {
|
||||
"version": {
|
||||
"qemu": {
|
||||
"micro": 0,
|
||||
"minor": 0,
|
||||
"major": 3
|
||||
},
|
||||
"package": "v3.0.0"
|
||||
},
|
||||
"capabilities": [
|
||||
"oob"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
{ "execute": "qmp_capabilities" }
|
||||
{
|
||||
"return": {
|
||||
}
|
||||
}
|
||||
|
||||
{ "execute": "query-status" }
|
||||
{
|
||||
"return": {
|
||||
"status": "prelaunch",
|
||||
"singlestep": false,
|
||||
"running": false
|
||||
}
|
||||
}
|
||||
|
||||
Please refer to docs/interop/qemu-qmp-ref.* for a complete command
|
||||
reference, generated from qapi/qapi-schema.json.
|
||||
|
||||
QMP wiki page
|
||||
-------------
|
||||
|
||||
https://wiki.qemu.org/QMP
|
Loading…
Add table
Add a link
Reference in a new issue