qmp-shell不能识别命令

所以,有一个python脚本允许从一个通常的shell连接到QEMU监视器。 我不得不从QEMU源代码树下载一堆文件 ,并将-qmp unix:./qmp-sock,server,nowait到vm命令行。 它连接,但我不能得到它的工作。

 $ qmp-shell qmp-sock Welcome to the QMP low-level shell! Connected to QEMU 1.5.3 (QEMU) help {u'error': {u'class': u'CommandNotFound', u'desc': u'The command help has not been found'}} (QEMU) query- query-balloon query-fdsets query-status query-block query-kvm query-target query-block-jobs query-machines query-tpm query-blockstats query-mice query-tpm-models query-chardev query-migrate query-tpm-types query-command-line-options query-migrate-cache-size query-uuid query-commands query-migrate-capabilities query-version query-cpu-definitions query-name query-vnc query-cpus query-pci query-events query-spice (QEMU) query-kvm {u'return': {u'enabled': True, u'present': True}} (QEMU) info block Error while parsing command line: list index out of range command format: <command-name> [arg-name1=arg1] ... [arg-nameN=argN] (QEMU) info {u'error': {u'class': u'CommandNotFound', u'desc': u'The command info has not been found'}} (QEMU) exit {u'error': {u'class': u'CommandNotFound', u'desc': u'The command exit has not been found'}} (QEMU) 

假设qmp-shell工作方式与通过QMP套接字直接发送JSON命令相同,您需要发出qmp_capabilities命令。 qmp中的其他命令在执行之前都不会工作,并会导致引用“CommandNotFound”错误。

有关详细信息,请参阅qemu维基页面。