3 # Print Virtual Machine information
9 # $ qemu [...] -monitor control,unix:./qmp,server
15 # Luiz Capitulino <lcapitulino@redhat.com>
18 from sys
import argv
,exit
22 print 'vm-info <unix-socket>'
25 qemu
= qmp
.QEMUMonitorProtocol(argv
[1])
27 qemu
.send("qmp_capabilities")
29 for cmd
in [ 'version', 'kvm', 'status', 'uuid', 'balloon' ]:
30 print cmd
+ ': ' + str(qemu
.send('query-' + cmd
))
32 if __name__
== '__main__':