qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: Machine-readable or parseable qemu output


From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: Machine-readable or parseable qemu output
Date: Thu, 15 Jan 2009 15:30:02 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Daniel P. Berrange wrote:
On Thu, Jan 15, 2009 at 02:27:05PM -0600, Anthony Liguori wrote:
Daniel P. Berrange wrote:
On Wed, Jan 14, 2009 at 04:40:05PM +0530, Amit Shah wrote:
Hello,

Continuing from the thread at [1], building on Daniel's suggestions, I
have jot down a few points as to how a libqemumonitor API could be
developed.

To recap, there has to be an interface to the qemu monitor in
a way that wouldn't break even if the monitor output changes. This API
will remain the same, so that consumers (libvirt, etc) can safely
integrate with the monitor.

Please see Dan's email at [1] to get the background details.

[1] http://www.mail-archive.com/address@hidden/msg14615.html

Here are some initial thoughts. Comments?
I'd like to add one more requirement

- Works with existing QEMU monitor for releases >= 0.8.0
I think this is a bad requirement.

This is because libvirt currently supports all QEMU >= 0.8.0,
libvirt has no bearing on upstream QEMU support :-)

so if
we're to be able to make use of this library we can't restrict it
to just new releases.
But you can conditionally use the new library instead of your custom parsing code for newer QEMU versions.

That is true, but if there are a number of apps around which want to
support multiple versions of QEMU, it is beneficial to centralize
this conditional logic in libqemumonitor.so instead, of making each
app implement the compat logic for the existing monitor format. I'm
not against adding a new machine friendly monitor format, I'd just
prefer it if one library API could provide impl for both old and new
format, obviously preferring to use the new format where available.

But then we have to design the API around what was parsable from the old monitor interface or provides complex probing interfaces to see what features are supported. This is a much more constrained problem for libvirt because it only accesses a subset of what the monitor does but when you do it at the QEMU level, there will be an expectation that we need to support everything that's done through the monitor. I'm concerned this will get very ugly very quickly.

Regards,

Anthony Liguori

Daniel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]