WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: veillard@xxxxxxxxxx
Subject: Re: [Xen-devel] Libvir: a simple C virtualization control library
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Sun, 18 Dec 2005 13:41:03 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 18 Dec 2005 19:43:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051215150327.GL23448@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20051215150327.GL23448@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
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