| # Simple QEMU shell on top of QMP |
| # Copyright (C) 2009 Red Hat Inc. |
| # Luiz Capitulino <lcapitulino@redhat.com> |
| # This work is licensed under the terms of the GNU GPL, version 2. See |
| # the COPYING file in the top-level directory. |
| # $ qemu [...] -monitor control,unix:./qmp,server |
| # Commands have the following format: |
| # < command-name > [ arg-name1=arg1 ] ... [ arg-nameN=argN ] |
| # (QEMU) info item=network |
| from sys import argv,exit |
| print 'bye exit from the shell' |
| print 'qemu-shell <unix-socket>' |
| qemu = qmp.QEMUMonitorProtocol(argv[1]) |
| cmd = raw_input('(QEMU) ') |
| print '-> command format: <command-name> ', |
| print '[arg-name1=arg1] ... [arg-nameN=argN]' |
| if __name__ == '__main__': |