One thing to know about the open source xend XenAPI - it does not come configured by default. you must enable it in the xend_config.sxp file

If I recall my brief foray into the open source XenAPI - it uses the same transport mechanisms, but the open source one is not ver heavily tested, and just plain broken in some versions of xen (especially for HVM guests)

However, you might be able to share some code under these two paths

Daniel P. Berrange wrote on 01/09/2009 10:30 AM:
On Fri, Jan 09, 2009 at 03:18:36PM +0000, Richard W.M. Jones wrote:
  
On Thu, Jan 08, 2009 at 12:53:51PM -0000, Gerhardus.Geldenhuis@gta-travel.com wrote:
    
   * libxenserver: The XenServer C SDK
      
[..]
    
All this can be downloaded from CDN at
http://community.citrix.com/display/xs/Download+SDKs
      
I took a look at the C library:

* It's LGPLv2+, so there is no license issue that I can see with
linking it to libvirt.

* It presents each XenServer API call as a C function.  Each C
function constructs an XML document (XMLRPC, I think), dispatches it
to the server, gets the reply, and unpacks the resulting XML.

* Uses libxml2 to do the XML construction and parsing.

* You have to supply your own HTTP library to pass the data to the
server.  The examples use libcurl for this.

* Compiles with -Wall -Werror without warnings or errors.

It seems reasonably sensible.  It still requires the proprietary
XenEnterprise to be installed for testing of course.
    

It is possible that it might work with the XenAPI impl in the open
source XenD  too - worth a try if you want to develop something

Daniel