Description of problem: Support for 'qemu-agent-command' human monitor command such as '--hmp' option like 'qemu-monitor-command' command, it will be very convenient for users, for example: # virsh qemu-monitor-command foo '{"execute":"human-monitor-command","arguments":{"command-line":"info cpus"}}' {"return":"* CPU #0: pc=0x00000000000ff858 (halted) thread_id=31196 \r\n","id":"libvirt-15"} # virsh qemu-monitor-command foo --hmp info cpus * CPU #0: pc=0x00000000000ff858 (halted) thread_id=31196 Version-Release number of selected component (if applicable): # rpm -q libvirt qemu-kvm-rhev kernel libvirt-0.10.1-1.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.302.el6.x86_64 kernel-2.6.32-288.el6.x86_64 How reproducible: alwasy Steps to Reproduce: 1. virsh start <domain> 2. virsh qemu-agent-command <domain> [--hmp] guest-info Actual results: # virsh qemu-agent-command <domain> guest-info # tailf /var/log//libvirt/libvirtd.log 2012-09-02 09:09:01.690+0000: 31799: error : virJSONValueFromString:1001 : internal error cannot parse json guest-info: lexical error: invalid char in json text. guest-info (right here) ------^ # virsh qemu-agent-command foo --hmp guest-info error: command 'qemu-agent-command' doesn't support option --hmp Expected results: Additional info:
--hmp would not make sense, since qemu-ga does not support HMP in any way. However, different option that would provide the functionality you actually want, i.e., to be able to specify the agent command without all the required json sugar around could be worth adding. Anyway, it's rather for upstream.
libvirt would take patches for this no doubt, but given that qemu-agent-command is reallly obscure and very few end users are ever going to use it, this is very minor and not worth tracking here IMO