qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] QEMU Dbus support - a proposal management API
Date: Tue, 11 Dec 2007 10:10:27 +0100	[thread overview]
Message-ID: <475E5403.2000705@bellard.org> (raw)
In-Reply-To: <f6ea40220712102316v470a51e7q3265e6e6b75aa8b2@mail.gmail.com>

Hi,

At this point I am not interested in integrating it into QEMU as it is 
one more API level to maintain in addition to the command line monitor. 
However, I can change my mind if several projects insists to have a 
similar interface.

Regards,

Fabrice.

Yuval Kashtan wrote:
> Some answers:
> - If there is interest I can re-create the patch so it will work against 
> the current head. I thought to receive some comments about it first..
> - thanks for the styling and configuration remarks, I will certainly fix 
> these. But before I invest more time in it, I would like to hear what 
> ppl think in general of management API? How do you like DBus as the 
> infrastructure for that? and what do you think of the proposed 
> implementation?
> - Currently only commands are implemented (with very few getters), but 
> of course this can be further extended to include values reading and 
> statistics.
> - This is very useful when you want to manage and control QEMU, for 
> instance developing a GUI to attach and detach usb devices or 
> controlling more than one instance of QEMU from a single management 
> point, receiving parameters externally and more.
> 
> 
> On Dec 10, 2007 10:51 PM, Blue Swirl <blauwirbel@gmail.com 
> <mailto:blauwirbel@gmail.com>> wrote:
> 
>     On 12/10/07, Yuval Kashtan < yuvalkashtan@gmail.com
>     <mailto:yuvalkashtan@gmail.com>> wrote:
>      > Hello All,
>      > Attached is a proposed patch which adds DBus support to QEMU.
>     DBus is a
>      > standard message bus for linux
>      > ( http://www.freedesktop.org/wiki/Software/dbus )
>      > The idea behind this is to allow for external programs such as
>     controlling
>      > GUI or HyperVisors to communicate and control QEMU, in a standard
>     manner.
>      > Although it is possible to connect to the monitor, an API is more
>     standard,
>      > theres no need to parse texts and error messages, no
>     internationalization
>      > problems and in general is a much better idea.
>      >
>      > Implementation:
>      > This is done by creating a DBus server from QEMU which raise
>     signals and act
>      > upon methods.
>      > Methods mainly implement same logic as the current command line
>     options and
>      > monitor does.
>      >
>      > How to use:
>      > To enable DBus support you'll have to add --enable-dbus when you
>     execure
>      > configure script.
>      > Then when you execute QEMU, you'll have to add -dbus-service
>     <service_name>
>      > where service_name follows the DBus naming convention (
>     xxx.xxx.xxx....)
>      > To support QEMU configuration through DBus,  you'll also have to add
>      > -dbus_configuration which will cause QEMU to wait until
>     ConfigDone is called
>      > through the DBus interface. this allows external programs time to
>     call DBus
>      > methods starting with Config_ which changes configuration (just
>     as the CLI
>      > does) thus enabling invocation of QEMU without parameters (beside
>     the DBus
>      > ones).
>      > With that, we have implemented a nice python script that reads VM's
>      > configuration from INI file.
>      >
>      > To compile this you will also have to compile the attached
>     freedesktop.org <http://freedesktop.org>
>      > dsrv library (it is also attach for those who can't handle GIT) from:
>      > git://people.freedesktop.org/~shaharf/dsrv
>      >
>      > Features:
>      > Currently support was added to all important CLI configuration
>     and some
>      > online monitor functions (such as connecting and disconnecting
>     usb devices).
>      > configuration methods begins with Config_ prefix and monitor ones
>     with
>      > Monitor_.
>      > For a complete list you can just execute qemu and connect with
>     dbus-viewer
>      > to see what is supported.
>      >
>      >
>      > All the dbus handling routines can be found in dbus-monitor.c.
>      > I have two different implementations of this:
>      > 1) A single threaded version. which comply to the qemu standard
>     of not
>      > opening additional threads.
>      > 2) A multi threaded version which open an additional, single,
>     thread which
>      > handles all the DBus load. I actually believe this version is
>     better as it
>      > allows QEMU to continue execution of guest operations even when
>     there are
>      > DBus methods/signals to handle, whereas in the first option, DBus is
>      > integrated into QEMU mainloop. Also this makes it possible to
>     monitor even
>      > during long operations (like monitoring the progress of savevm)
>      >
>      >
>      > Please comment both on the idea of management API and the proposed
>      > implementation.
>      >
>      >
>      > Attached are:
>      > RFC-QEMU-Dbus.patch - patch file including all necessary changes
>     to qemu.
>      > was made against QEMU HEAD as of 23/9 morning.
>      > RFC-QEMU-Dbus-Interface.xml - the xml description of the DBus
>     interface that
>      > I suggest.
>      > dsrv.tar.gz.txt - the dbus server library.
> 
>     I have no idea if this is useful. I would have tried the patch, but it
>     does not apply to current CVS. Other comments:
> 
>     When configure is invoked with --enable-dbus, it should check for DBUS
>     libraries and abort if not found.
> 
>     The coding style in monitor-dbus.c is different from what is commonly
>     used in Qemu. Some long lines could be shortened.
> 
>     Enabling of DEBUG_ACPI and other ACPI changes are probably not
>     directly needed so they should be in separate patches.
> 
>     Only commands are included, how about reading values and statistics?
> 
> 
> 
> 
> 
> -- 
> Sincerly,
> Yuval Kashtan

  reply	other threads:[~2007-12-11  9:10 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10  8:28 [Qemu-devel] [RFC] QEMU Dbus support - a proposal management API Yuval Kashtan
2007-12-10 20:51 ` Blue Swirl
2007-12-11  7:16   ` Yuval Kashtan
2007-12-11  9:10     ` Fabrice Bellard [this message]
2007-12-11  9:23       ` Laurent Vivier
2007-12-11 10:06         ` Brad Campbell
2007-12-11 10:07         ` Dor Laor
2007-12-11 14:51           ` Anthony Liguori
2007-12-11 15:00             ` Daniel P. Berrange
2007-12-11 15:21               ` Yuval Kashtan
2007-12-11 15:31                 ` Daniel P. Berrange
2007-12-11 15:36                 ` Anthony Liguori
2007-12-11 15:59                   ` Avi Kivity
2007-12-11 16:18                     ` Paul Brook
2007-12-11 16:40                       ` Avi Kivity
2007-12-11 15:02             ` Daniel P. Berrange
2007-12-11 15:15               ` Anthony Liguori
2007-12-11 15:40                 ` Richard W.M. Jones
2007-12-11 15:48                   ` Anthony Liguori
2007-12-11 15:58                     ` Daniel P. Berrange
2007-12-11 16:49                       ` Anthony Liguori
2007-12-11 17:04                         ` Daniel P. Berrange
2007-12-11 15:59                     ` Dor Laor
2007-12-11 15:17             ` Jean-Christian de Rivaz
2007-12-11 15:24               ` Daniel P. Berrange
2007-12-11 10:20         ` Andreas Färber
2007-12-11 10:29           ` Laurent Vivier
2007-12-11 10:50             ` Andreas Färber
2007-12-11 10:21         ` Heikki Lindholm
2007-12-11 11:05       ` Avi Kivity
2007-12-11 14:43         ` Anthony Liguori
2007-12-11 14:56         ` Daniel P. Berrange
2007-12-11 15:57           ` Avi Kivity
2007-12-11 16:07             ` Richard W.M. Jones
2007-12-11 15:44     ` Daniel P. Berrange
2007-12-11 16:10       ` Fabrice Bellard
2007-12-11 14:53 ` Daniel P. Berrange

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=475E5403.2000705@bellard.org \
    --to=fabrice@bellard.org \
    --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).