Bug 853708 - [RFE] Support for qemu-monitor-command command hmp option
[RFE] Support for qemu-monitor-command command hmp option
Status: CLOSED DEFERRED
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
: FutureFeature
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2016-03-23 18:39:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
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:
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.