qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: armbru@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com,
	mreitz@redhat.com, kwolf@redhat.com, den@openvz.org,
	Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Subject: Re: [Qemu-devel] [PATCH v2 3/6] qapi: add nbd-server-remove
Date: Wed, 17 Jan 2018 10:03:36 -0600	[thread overview]
Message-ID: <1298bc3d-c2bd-6fd5-5d3d-dabcae434874@redhat.com> (raw)
In-Reply-To: <eccba06f-3a5f-7926-7fb5-ce56f01e94c7@virtuozzo.com>

[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]

On 01/17/2018 09:51 AM, Vladimir Sementsov-Ogievskiy wrote:

>>> I have a script (for managing libvirt guest, but it can be adopted for
>>> qemu or even used for qemu monitor), which allows
>>> me run qmp commands on vms as easy as:
>>>
>>> |qmp VMNAME query-block-jobs or qmp VMNAME nbd-server-remove name exp1
>>> mode hard or even |
>>>
>>> |qmp VMNAME blockdev-add id disk driver qcow2 cache {writeback true
>>> direct true} aio native discard unmap file {driver file filename
>>> /tmp/somedisk} |||
>> Yeah, there are various scripting solutions around QMP that can make it
>> easier; but HMP is often still an easy front-line interface for
>> experiments.
>>
> 
> isn't it because these solutions are not available directly in monitor,
> when HMP is?

QMP can be directly accessed in a monitor; it just requires more typing.
 If you are developing QMP commands, it may be easier to use
./scripts/qmp/qmp-shell (couple it with a readline wrapper, and you can
even get tab-completion and history across sessions).  There's also
things like libvirt's 'virsh qmp-monitor-command' for shell-scripting
access to arbitrary QMP commands, provided your guest is run by libvirt.

> may be, we need third type of monitor HQMP which is QMP with simplified
> syntax? Or
> allow qmp commands in simplified syntax directly in HMP?

No, I don't think we need either thing.  Wrappers around existing
monitors is better than bloating qemu proper with a third flavor of
monitor.  And HMP is for humans, with no restrictions on back-compat
changes, so if it doesn't do something you want for quick-and-dirty
testing, you can either add a new HMP command, or just use QMP (or one
of its wrappers, like qmp-shell) in the first place.  Ultimately, our
long-term concern is only about the QMP interface; HMP is supposed to be
convenient.  So if it starts costing too much time to port a QMP
interface to HMP, then don't worry about it.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2018-01-17 16:04 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 15:50 [Qemu-devel] [PATCH v2 0/6] nbd export qmp interface Vladimir Sementsov-Ogievskiy
2017-12-07 15:50 ` [Qemu-devel] [PATCH v2 1/6] nbd/server: add additional assert to nbd_export_put Vladimir Sementsov-Ogievskiy
2018-01-10 16:33   ` Eric Blake
2017-12-07 15:50 ` [Qemu-devel] [PATCH v2 2/6] qapi: add name parameter to nbd-server-add Vladimir Sementsov-Ogievskiy
2017-12-08 17:33   ` Dr. David Alan Gilbert
2017-12-09  9:28     ` Vladimir Sementsov-Ogievskiy
2018-01-09 19:06     ` Eric Blake
2018-01-10 16:01       ` Dr. David Alan Gilbert
2018-01-09 19:28     ` [Qemu-devel] [PATCH v2 2.5/6] hmp: Add name parameter to nbd_server_add Eric Blake
2018-01-11 17:59       ` Dr. David Alan Gilbert
2018-01-11 19:50         ` Eric Blake
2018-01-11 20:11           ` Dr. David Alan Gilbert
2018-01-09 19:05   ` [Qemu-devel] [PATCH v2 2/6] qapi: add name parameter to nbd-server-add Eric Blake
2017-12-07 15:50 ` [Qemu-devel] [PATCH v2 3/6] qapi: add nbd-server-remove Vladimir Sementsov-Ogievskiy
2018-01-09 19:52   ` Eric Blake
2018-01-12  9:47     ` Vladimir Sementsov-Ogievskiy
2018-01-15 15:09       ` Eric Blake
2018-01-15 17:47         ` Vladimir Sementsov-Ogievskiy
2018-01-17 13:36           ` Vladimir Sementsov-Ogievskiy
2018-01-17 15:23             ` Eric Blake
2018-01-17 15:51               ` Vladimir Sementsov-Ogievskiy
2018-01-17 16:03                 ` Eric Blake [this message]
2018-01-17 16:39                   ` Vladimir Sementsov-Ogievskiy
2018-01-26 15:05                     ` Dr. David Alan Gilbert
2018-02-06 15:29                       ` Vladimir Sementsov-Ogievskiy
2018-02-06 16:06                         ` Eric Blake
2018-02-06 17:54                           ` Vladimir Sementsov-Ogievskiy
2018-02-06 18:38                         ` Dr. David Alan Gilbert
2018-02-07  7:14                           ` Markus Armbruster
2017-12-07 15:51 ` [Qemu-devel] [PATCH v2 4/6] iotest 147: add cases to test new @name parameter of nbd-server-add Vladimir Sementsov-Ogievskiy
2018-01-09 20:21   ` Eric Blake
2017-12-07 15:51 ` [Qemu-devel] [PATCH v2 5/6] iotests: implement QemuIoInteractive class Vladimir Sementsov-Ogievskiy
2018-01-09 20:34   ` Eric Blake
2018-01-12 11:56     ` Vladimir Sementsov-Ogievskiy
2018-01-12 16:48       ` Eric Blake
2017-12-07 15:51 ` [Qemu-devel] [PATCH v2 6/6] iotest 201: new test for qmp nbd-server-remove Vladimir Sementsov-Ogievskiy
2018-01-09 20:49   ` Eric Blake
2018-01-12 11:43     ` Vladimir Sementsov-Ogievskiy
2018-01-12 16:54       ` Eric Blake
2018-01-15 14:40         ` Vladimir Sementsov-Ogievskiy
2018-01-15 15:05           ` Eric Blake
2018-01-15 18:28             ` Vladimir Sementsov-Ogievskiy
2017-12-21 11:52 ` [Qemu-devel] ping Re: [PATCH v2 0/6] nbd export qmp interface Vladimir Sementsov-Ogievskiy
2017-12-21 15:28 ` [Qemu-devel] " Markus Armbruster
2017-12-21 18:32   ` Eric Blake
2017-12-22  8:53     ` Vladimir Sementsov-Ogievskiy
2017-12-22 15:47       ` Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2018-01-18 18:11 Vladimir Sementsov-Ogievskiy
2018-01-18 18:11 ` [Qemu-devel] [PATCH v2 3/6] qapi: add nbd-server-remove Vladimir Sementsov-Ogievskiy
2018-01-18 22:13   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1298bc3d-c2bd-6fd5-5d3d-dabcae434874@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=dgilbert@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nshirokovskiy@virtuozzo.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).