Develop for XenServer

Getting Started with C

The XenServer-SDK directory contains the following folders that are relevant to C programmers:

  • libxenserver: The XenServer SDK for C.

    • bin: The libxenserver compiled library.

    • src: The libxenserver source code and a Makefile to build it. Every API object is associated with a header file, which contains declarations for all the object’s API functions. For example, the type definitions and functions required to invoke VM operations are all contained in xen_vm.h.

RPC protocol

The C SDK supports the XML-RPC protocol.

Platform supported

  • Linux
  • Windows (under cygwin)

Library

The library is generated as libxenserver.so that is linked by C programs.

Note:

This library is not backwards compatible. To interact with hosts running older versions of XenServer or Citrix Hypervisor, it is advisable to use the library of the same version as the host.

Dependencies

The library is dependent upon the XML toolkit from the GNOME project, by Daniel Veillard, et al. It is packaged as libxml2-devel on CentOS and libxml2-dev on Debian.

Building the source code

To compile the source code type make in the libxenserver/src directory.

Examples

Examples on the usage of the C SDK can be found at libxenserver usage examples on GitHub.

Getting Started with C