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

Re: [Xen-devel] Libvir: a simple C virtualization control library



Hi Daniel,

I think the goal of having a library that allows applications to interact with Xen is a great idea.

I suggest though that instead of taking the current approach of reimplementing a hypercall library, you consider just using Xend's HTTP interface.

xm/xend communicate via an web services API that's based on S-Expressions. Xend can listen on a domain socket and/or a TCP socket for incoming connections so both transports should be supported.

You can access this interface by doing an HTTP request with the Content-Type set to application/sxp. The protocol uses the URL to identify the command and options and returns s-expressions. You can get a feeling for the supported commands by enabling the TCP server and going to http://localhost:8000/xend/domain/

This would allow you to have an LGPL control library yet not rewrite all of Xend. It also requires minimal dependencies since I believe libxml2 already has an HTTP client (though you'd have to add a domain socket transport).

An interesting thing to do too would be to attempt to add support to Xend for another mime type (like text/xml) and perhaps even support XML-RPC. This would be really excellent long term as it could eliminate a ton of code in Xend and xm by just reusing the python XML-RPC support.

Regards,

Anthony Liguori

Daniel Veillard wrote:

 This mail is to present a new project being started:

      Libvir: a simple C virtualization control library

The libvir library is born from the need for a simpler userland C library
to watch and control Xen domains. Among the design goal are:

  - being able to provide API and ABI guarantee
  - LGPL to be able to use it in a variety of contexts
  - pure C, minimizing dependancies
  - aiming at full documentation coverage

A typical example of use case should be the applet displaying local Xen
domains status in Fedora Core desktop.

The current state is a small library to get informations and interract
with existing domains, the design is not frozen, though the existing code
should work as is, it is considered mostly as a way to bootstrap and
seed the project, we are seeking interest from others. The library could
be extended in various ways potentally supporting other virtualization
mechanisms like QEmu, allowing to start new domains, etc. as long as the
API is kept simple enough.

The project is hosted at :
    http://libvir.org/
API  http://libvir.org/html/libvir-libvir.html

See the download page at http://libvir.org/downloads.html to get sources
or CVS checkout, and https://www.redhat.com/mailman/listinfo/libvir-list
for the mailing-list informations, which would be the best place to discuss
this for those interested in this project,

  yours,

Daniel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.