Bug 853708 - [RFE] Support for qemu-monitor-command command hmp option
Summary: [RFE] Support for qemu-monitor-command command hmp option
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-02 09:44 UTC by Alex Jia
Modified: 2016-03-23 22:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-23 22:39:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Alex Jia 2012-09-02 09:44:03 UTC
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 11:57:10 UTC
--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 22:39:04 UTC
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.