From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Libvir: a simple C virtualization control library Date: Sun, 18 Dec 2005 13:41:03 -0600 Message-ID: <43A5BB4F.2030100@us.ibm.com> References: <20051215150327.GL23448@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20051215150327.GL23448@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: veillard@redhat.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 > > >