From: Luiz Capitulino <lcapitulino@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Libvirt <libvir-list@redhat.com>,
Jiri Denemark <jdenemar@redhat.com>,
Chris Lalancette <clalance@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [libvirt] Libvirt debug API
Date: Mon, 12 Apr 2010 12:20:13 -0300 [thread overview]
Message-ID: <20100412122013.58894a64@redhat.com> (raw)
In-Reply-To: <20100409142717.GA11875@redhat.com>
On Fri, 9 Apr 2010 15:27:17 +0100
"Daniel P. Berrange" <berrange@redhat.com> wrote:
> On Fri, Apr 09, 2010 at 09:41:39AM -0400, Chris Lalancette wrote:
> > Hello,
> > In response to a lot of the talk of qemud lately on qemu-devel, the
> > libvirt community would like to put forward a proposal to help enable
> > debug/advanced options when using various hypervisors. The goals of
> > this API are:
> >
> > 1) To enable more rapid access to hypervisor features before proper
> > libvirt API's are designed around them.
> > 2) To facilitate debugging and access to advanced features that may
> > not fit into the normal libvirt world-view.
> >
> > Caveats:
> > 1) Unlike other libvirt API's, this one will explicitly *not* be
> > guaranteed ABI/API compatible between libvirt updates.
>
> I think we'd still aim to keep the public API stable. The bit that we
> can't guarentee is the interactions with QEMU & the libvirt driver.
> eg, if someone was using the API to send text monitor commands to
> QEMU, and the next libvirt release switched to JSON mode, that use
> would break. The API would still be valid, but the way they use it
> might not be. Similarly if they add some custom extra command line
> argument, this could potentially conflict with an extra command line
> arg a subsquent libvirt release used. eg, they used -device to add
> a PCI card with a specific PCI address. Then next libvirt release
> specifies this same PCI address and then you get a clash.
Another problem is issuing Monitor commands that could confuse libvirt's
real API. Say, adding a device libvirt doesn't know about or stopping the VM
while libvirt thinks it's still running or anything like that.
When I suggested the monitor passthrough idea, I thought it could be a
workaround for the feature time lag problem, but as stated by Avi, I'm
afraid that this can potentially cause more problems than it solves.
It's very desirable for debugging (item 2 above) and maybe to try new
things, but people couldn't use it for anything serious, which is the
major issue in this subject (item 1 above).
Now, Anthony's idea of having libqemu has the same issues, which seems
to mean that the only way to really fix the time lag is to fix the
time lag :)
> > Raw access to the qemu monitor will be disabled by default; the
> > <monitorpassthrough/> tag enables the ability to send QMP (or
> > text, if you are using older qemu) messages straight through to the
> > monitor. To do this there will be an additional API entry point
> > named virDomainDebugCommand() which takes an arbitrary string
> > and passes it to the monitor, and returns an arbitrary string as
> > a result. Thus you could pass in either "info cpus" if using the
> > text monitor or '{ "execute": "query-cpus" }' if using QMP.
>
> Again the idea of a 'virDomainDebugCommand' API is QEMU specific, with
> other hypervisors have different approaches for low level extension/
> debug. For example, Xen would involve XenStore access, or XenD XMLRPC,
> etc. So this should really live in a separate API namespace which is
> specific to a hypervisor. For example, as a header file
>
> #include <libvirt/libvirt-qemu.h>
>
> Containing APIs like
>
> int virDomainQEMUInvokeMonitor(virDomainPtr dom,
> const char *command,
> char **reply);
>
> typedef virConnectQEMUDomainEventCallback(virConnectPtr conn,
> virDomainPtr dom,
> const char *eventname,
> const char *data,
> void *opaque)
> int virConnectQEMUDomainEventRegister(virConnectPtr conn,
> virDomainPtr dom,
> const char *eventname,
> virDomainQEMUMonitorCallback cb,
> void *opaque);
What about all the wonders of json? This will force clients to
have their own json <-> text converter, maybe we could provide two
APIs, just like qemu driver works internally?
next prev parent reply other threads:[~2010-04-12 15:54 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 13:41 [Qemu-devel] Libvirt debug API Chris Lalancette
2010-04-09 14:27 ` [Qemu-devel] Re: [libvirt] " Daniel P. Berrange
2010-04-09 18:16 ` Chris Lalancette
2010-04-12 12:41 ` Daniel P. Berrange
2010-04-12 13:56 ` Chris Lalancette
2010-04-12 14:18 ` Daniel P. Berrange
2010-04-09 21:06 ` Jamie Lokier
2010-04-09 21:30 ` [libvirt] [Qemu-devel] " Eric Blake
2010-04-10 12:05 ` Paolo Bonzini
2010-04-11 20:28 ` [Qemu-devel] Re: [libvirt] " Richard W.M. Jones
2010-04-11 22:17 ` Jamie Lokier
[not found] ` <20100412085621.GN26162@redhat.com>
2010-04-12 12:23 ` [libvirt] [Qemu-devel] " Jamie Lokier
2010-04-12 13:05 ` Daniel P. Berrange
2010-04-22 18:47 ` Anthony Liguori
2010-04-23 6:36 ` Jes Sorensen
2010-04-23 10:30 ` Daniel P. Berrange
2010-04-12 12:53 ` [Qemu-devel] Re: [libvirt] " Daniel P. Berrange
2010-04-12 15:20 ` Luiz Capitulino [this message]
2010-04-22 18:49 ` Anthony Liguori
2010-04-23 12:48 ` Avi Kivity
2010-04-23 13:48 ` Anthony Liguori
2010-04-23 14:24 ` Avi Kivity
2010-04-23 14:36 ` [libvirt] [Qemu-devel] " Daniel P. Berrange
2010-04-26 12:54 ` Jamie Lokier
2010-04-26 14:25 ` Chris Lalancette
2010-04-26 14:34 ` Avi Kivity
2010-04-26 14:54 ` Daniel P. Berrange
2010-04-26 15:08 ` Anthony Liguori
2010-04-26 15:20 ` Daniel P. Berrange
2010-04-26 15:55 ` Anthony Liguori
2010-04-23 18:29 ` [Qemu-devel] Re: [libvirt] " Anthony Liguori
2010-04-24 9:46 ` Avi Kivity
2010-04-25 3:39 ` Anthony Liguori
2010-04-25 11:51 ` Avi Kivity
2010-04-26 1:53 ` Anthony Liguori
2010-04-26 5:56 ` Avi Kivity
2010-04-26 9:56 ` [libvirt] [Qemu-devel] " Matthias Bolte
2010-04-26 13:14 ` [Qemu-devel] Re: [libvirt] " Anthony Liguori
2010-04-26 13:41 ` Avi Kivity
2010-04-26 13:46 ` Anthony Liguori
2010-04-26 13:53 ` Avi Kivity
2010-04-26 13:58 ` Daniel P. Berrange
2010-04-26 14:26 ` Anthony Liguori
2010-04-26 14:32 ` Daniel P. Berrange
2010-04-26 9:59 ` Daniel P. Berrange
2010-04-26 13:13 ` Anthony Liguori
2010-04-26 13:31 ` Daniel P. Berrange
2010-04-26 13:43 ` Anthony Liguori
2010-04-26 14:01 ` Avi Kivity
2010-04-26 14:19 ` Anthony Liguori
2010-04-26 14:25 ` Avi Kivity
2010-04-26 14:28 ` Anthony Liguori
2010-04-26 14:38 ` Avi Kivity
2010-04-26 14:48 ` Anthony Liguori
2010-04-26 14:51 ` Avi Kivity
2010-04-23 14:34 ` Daniel P. Berrange
2010-04-23 15:43 ` Markus Armbruster
2010-04-22 18:45 ` Anthony Liguori
2010-04-22 19:10 ` Anthony Liguori
2010-04-23 10:28 ` Daniel P. Berrange
2010-04-23 13:40 ` Anthony Liguori
2010-04-23 14:21 ` Daniel P. Berrange
2010-04-23 18:33 ` Anthony Liguori
2010-04-25 14:50 ` Avi Kivity
2010-04-26 13:14 ` Anthony Liguori
2010-04-09 20:07 ` 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=20100412122013.58894a64@redhat.com \
--to=lcapitulino@redhat.com \
--cc=berrange@redhat.com \
--cc=clalance@redhat.com \
--cc=jdenemar@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).