From: "Daniel P. Berrange" <berrange@redhat.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Libvirt <libvir-list@redhat.com>,
Jiri Denemark <jdenemar@redhat.com>,
Chris Lalancette <clalance@redhat.com>,
"Richard W.M. Jones" <rjones@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [libvirt] Libvirt debug API
Date: Mon, 12 Apr 2010 13:53:36 +0100 [thread overview]
Message-ID: <20100412125336.GB9987@redhat.com> (raw)
In-Reply-To: <20100411221738.GA27990@shareable.org>
On Sun, Apr 11, 2010 at 11:17:38PM +0100, Jamie Lokier wrote:
> Richard W.M. Jones wrote:
> > On Fri, Apr 09, 2010 at 10:06:51PM +0100, Jamie Lokier wrote:
> > > Daniel P. Berrange wrote:
> > > > I think this alteration of existing args is faaaar too complex & fragile,
> > > > and way overkill.
> > >
> > > Would it not be simpler, for the target audience, for the config to
> > > contain a one-line shell script to transform particular matched
> > > arguments in any way that's wanted?
> >
> > I might be missing something but I thought you could already do this
> > in current libvirt. ie. Change the <emulator> element [1] to point to
> > your shell script:
> >
> > <emulator>/usr/local/bin/my-qemu-wrapper.sh</emulator>
> >
> > The wrapper should get called with the command line arguments and you
> > can alter them however you like.
> >
> > Isn't that right, Dan?
>
> That forces the shell script to be relatively complicated and
> recognise all qemu arguments (including version specific ones) to skip
> the ones with parameters - and to know where to look for the real
> target executable is.
>
> It's not a very friendly way to add or change parts of specific
> subsystems, for example modifying a blockdev parameter, but it can be
> done that way if necessary.
>
> It's not that hard to write this for trivial extra options:
>
> <emulator>/bin/sh -c 'qemu "$0" "$@" -extra-flag'</emulator>
>
> (if that works).
>
> But for things like modifications to particular devices, wouldn't it
> be better to associate "add cache=special option" to a section about
> one of the blockdevs which libvirt knows about, rather than the awful
> prospect of parsing libvirt's output to guess which of three -device
> arguments corresponds with the second SCSI drive mentioned in the
> libvirt config - which might not necessarily be the second on the
> command line, even.
Every device has a unique alias in the XML, which maps onto the 'id='
parameter for QEMU so you can match up them. We need to consider the
tradeoff between what's likely to be neccessary vs cost of supporting
the extensions. Allowing addition of arbitrary extra command lines is
a trivial extension with low support cost & covers the most pressing
feature timelag problems. Munging existing dev options is a less common
scenario with significantly higher support burden which I don't really
consider worth explicitly supporting beyond the existing ability to add
a wrapper script.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
next prev parent reply other threads:[~2010-04-12 12:53 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 ` Daniel P. Berrange [this message]
2010-04-12 15:20 ` [Qemu-devel] Re: [libvirt] " 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
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=20100412125336.GB9987@redhat.com \
--to=berrange@redhat.com \
--cc=clalance@redhat.com \
--cc=jamie@shareable.org \
--cc=jdenemar@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.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).