Bug 853708 - [RFE] Support for qemu-monitor-command command hmp option
[RFE] Support for qemu-monitor-command command hmp option
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2012-09-02 05:44 EDT by Alex Jia
Modified: 2016-03-23 18:39 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-23 18:39:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alex Jia 2012-09-02 05:44:03 EDT
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

How reproducible:

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.
                     (right here) ------^

# virsh qemu-agent-command foo --hmp guest-info
error: command 'qemu-agent-command' doesn't support option --hmp

Expected results:

Additional info:
Comment 2 Jiri Denemark 2012-09-03 07:57:10 EDT
--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.
Comment 3 Cole Robinson 2016-03-23 18:39:04 EDT
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

Note You need to log in before you can comment on or make changes to this bug.