mirror of https://gitee.com/openkylin/qemu.git
QMP: Drop vm-info example script
It's broken and not really useful, let's just drop it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
9bed0d0d1c
commit
4cdbc094ca
|
@ -19,10 +19,7 @@ o qmp-spec.txt QEMU Monitor Protocol current specification
|
||||||
o qmp-commands.txt QMP supported commands (auto-generated at build-time)
|
o qmp-commands.txt QMP supported commands (auto-generated at build-time)
|
||||||
o qmp-events.txt List of available asynchronous events
|
o qmp-events.txt List of available asynchronous events
|
||||||
|
|
||||||
There are also two simple Python scripts available:
|
There is also a simple Python script called 'qmp-shell' available.
|
||||||
|
|
||||||
o qmp-shell A shell
|
|
||||||
o vm-info Show some information about the Virtual Machine
|
|
||||||
|
|
||||||
IMPORTANT: It's strongly recommended to read the 'Stability Considerations'
|
IMPORTANT: It's strongly recommended to read the 'Stability Considerations'
|
||||||
section in the qmp-commands.txt file before making any serious use of QMP.
|
section in the qmp-commands.txt file before making any serious use of QMP.
|
||||||
|
|
33
QMP/vm-info
33
QMP/vm-info
|
@ -1,33 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
#
|
|
||||||
# Print Virtual Machine information
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
#
|
|
||||||
# Start QEMU with:
|
|
||||||
#
|
|
||||||
# $ qemu [...] -monitor control,unix:./qmp,server
|
|
||||||
#
|
|
||||||
# Run vm-info:
|
|
||||||
#
|
|
||||||
# $ vm-info ./qmp
|
|
||||||
#
|
|
||||||
# Luiz Capitulino <lcapitulino@redhat.com>
|
|
||||||
|
|
||||||
import qmp
|
|
||||||
from sys import argv,exit
|
|
||||||
|
|
||||||
def main():
|
|
||||||
if len(argv) != 2:
|
|
||||||
print 'vm-info <unix-socket>'
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
qemu = qmp.QEMUMonitorProtocol(argv[1])
|
|
||||||
qemu.connect()
|
|
||||||
qemu.send("qmp_capabilities")
|
|
||||||
|
|
||||||
for cmd in [ 'version', 'kvm', 'status', 'uuid', 'balloon' ]:
|
|
||||||
print cmd + ': ' + str(qemu.send('query-' + cmd))
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
Loading…
Reference in New Issue