qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Libvirt <libvir-list@redhat.com>,
	Jiri Denemark <jdenemar@redhat.com>,
	Chris Lalancette <clalance@redhat.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] Re: [libvirt] Libvirt debug API
Date: Sat, 24 Apr 2010 12:46:08 +0300	[thread overview]
Message-ID: <4BD2BDE0.7020907@redhat.com> (raw)
In-Reply-To: <4BD1E723.6070005@codemonkey.ws>

On 04/23/2010 09:29 PM, Anthony Liguori wrote:
>> Maybe.  We'll still have issues.  For example, sVirt: if a QMP 
>> command names a labeled resource, the non-libvirt user will have no 
>> way of knowing how to label it.
>
>
> This is orthogonal to QMP and has to do strictly with how libvirt 
> prepares a resource for qemu.


It's not orthogonal.  If you allow qmp access behind libvirt's back, 
it's a problem that you will have.

>
>> Much better to exact a commitment from libvirt to track all QMP (and 
>> command line) capabilities.  Instead of adding cleverness to QMP, add 
>> APIs to libvirt.
>>
>
> Let's step back for a minute because I think we're missing the forest 
> through the trees.
>
> We're trying to address a few distinct problems:
>
> 1) Allow libvirt users to access features of qemu that are not exposed 
> through libvirt

That's an artificial problem.  If libvirt exposes all features, you 
don't need to solve it.

>
> 2) Provide a means for non-libvirt users to interact with qemu

We have qmp.  It doesn't do multiple guest management.  I think it's 
reasonable to have a qemud which does (and also does sVirt and the 
zillion other things libvirt does) provided we remove them from libvirt 
(long term).  The only problem is that it's a lot of effort.

>
> 3) Provide a unified and interoperable view of the world for 
> non-libvirt and libvirt users

This problem can be solved by the non-libvirt users adopting libvirt, or 
the libvirt users dropping libvirt.  I don't understand why we need to 
add interoperability between users who choose an interoperability 
library and users who don't choose an interoperability library.

>
> For (1), we all agree that the best case scenario would be for libvirt 
> to support every qemu feature.  I think we can also all agree though 
> that this is not really practical and certainly not practical for 
> developers since there is a development cost associated with libvirt 
> support (to model an API appropriately).

All except me, perhaps.

We already have two layers of feature modeling: first, we mostly emulate 
real life, not invent new features.  PCI hotplug existed long before 
qemu had support for it.  Second, we do give some thought into how we 
expose it through QMP.  libvirt doesn't have to invent it again, it only 
has to expose it through its lovely xml and C APIs.

>
> The new API proposed addresses (1) by allowing a user to drill down to 
> the QMP context.  It's a good solution IMHO and I think we all agree 
> that there's an inherent risk to this that users will have to evaluate 
> on a case-by-case basis.  It's a good stop-gap though.

Agree.

>
> (2) is largely addressed by QMP and a config file.  I'd like to see a 
> nice C library, but I think a lot of other folks are happy with JSON 
> support in higher level languages.

I agree with them.  C is a pretty bad choice for managing qemu (or even, 
C is a pretty bad choice).

>
> (3) is the place where there are still potential challenges.  I think 
> at the very least, our goal should be to enable conversion from (2) 
> and (1) to be as easy as possible.  That's why I have proposed 
> implementing a C library for the JSON transport because we could plumb 
> that through the new libvirt API.  This would allow a user to very 
> quickly port an application from QMP to libvirt.  In order to do this, 
> we need the libvirt API to expose a dedicated monitor because we'll 
> need to be able to manipulate events and negotiate features.

Most likely any application that talks QMP will hide the protocol behind 
a function call interface anyway.

> Beyond simple porting, there's a secondary question of having 
> non-libvirt apps co-exist with libvirt apps.  I think it's a good long 
> term goal, but I don't think we should worry too much about it now.

libvirt needs to either support all but the most esoteric use cases, or 
to get out of the way completely.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

  reply	other threads:[~2010-04-24  9:46 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
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 [this message]
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=4BD2BDE0.7020907@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=clalance@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=lcapitulino@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).