XenServer SDK Overview
XenServer can be programatically managed using the XenAPI or XAPI. XAPI is an open source sub-project of the Xen Project. XAPI is an XML-RPC based API, providing programmatic access to the extensive set of XenServer management features. The XenServer API can be called from a remote system as well as local to the XenServer host. Remote calls are generally made securely over HTTPS, using port 443.
There are five SDKs available, one for each of C, C#, Java, PowerShell, and Python. Prior to XenServer 6.1, these SDKs were available under a LGPL/GPL license model, but the current SDKs use a BSD license. All SDKs are backwards compatible to XenServer 4.0, but it is always preferable to use the most recent SDK. To ensure a graceful fallback, client programs are expected to call host.software_version["product_version"] when appropriate.
XenServer API References
- XenServer SDK Documentation (HTML Format)
- API Guide (PDF Format)
- API Class Structure (HTML Format)
- SDK Guide (PDF Format)
- DDK Guide (PDF Format)
- SDK Release Notes (HTML Format)
- Powershell SDK Overview (HTML Format)
- XenServer Performance Metrics (RRDs)
- WMI Interface - A Supported Mechanism to access XenStore data in Windows guests
Download SDK Components
- Software Development Kit (C, C#, Java, Python and Powershell bindings)
- Driver Development Kit (RPMs required for driver development)
XenServer Plugin Development
The XenServer Transfer VM is used to import and export virtual disk images.
- Overview of the main code examples as shipped with the SDK
- Information on developing applications providing console access including VNC access.
- A Pool Checking Plugin For Nagios
- Automating VM operations using PowerShell
XenServer SDK Forum (Citrix.com)
- Asynchronous API calls
- Debugging XenServer using events and logs
- How to use the Event class method from() to replace the legacy next() method
- Detecting available updates and hotfixes
- How an application can associate VMs with a host (Within a longer article about writing a XenCenter clone)
- Undocumented Option Structures in the XenServer API
- Setting Up a Test or Teaching Environment For XenServer
- What to do if you suspect a fault in XenServer or the SDKs
- Useful tips for developers working with GPUs
- Advice for developers on login to XenServer and debug of connections to XenServer
- Several debug techniques for monitoring storage subsystems can be found in the XS 6.1 Storage Performance Guide which maybe of use to those developing products interfacing with the storage sub-system.
- Tools for debugging and development on XenServer
- Developing products for XenServer as a platform for OpenStack or CloudStack
Feedback on these pages:
If you have found an error, or think some of the pages in this area need clarifying/augmenting; or you think there are application development tasks we should describe in new how-to-guides; or you have guides you'd like to suggest we include or link to please do comment on our feedback thread: