Default value: | OpaqueRef:NULL | |
Published in: | XenServer 6.0 (boston) |
Subsections of XenAPI
XenAPI Basics
This document contains a description of the Xen Management API - an interface for remotely configuring and controlling virtualised guests running on a Xen-enabled host.
The API is presented here as a set of Remote Procedure Calls (RPCs). There are two supported wire formats, one based upon XML-RPC and one based upon JSON-RPC (v1.0 and v2.0 are both recognized). No specific language bindings are prescribed, although examples are given in the Python programming language.
Although we adopt some terminology from object-oriented programming, future client language bindings may or may not be object-oriented. The API reference uses the terminology classes and objects. For our purposes a class is simply a hierarchical namespace; an object is an instance of a class with its fields set to specific values. Objects are persistent and exist on the server-side. Clients may obtain opaque references to these server-side objects and then access their fields via get/set RPCs.
For each class we specify a list of fields along with their types and qualifiers. A qualifier is one of:
RO/runtime: the field is Read Only. Furthermore, its value is automatically computed at runtime. For example, current CPU load and disk IO throughput.
RO/constructor: the field must be manually set when a new object is created, but is then Read Only for the duration of the object’s life. For example, the maximum memory addressable by a guest is set before the guest boots.
RW: the field is Read/Write. For example, the name of a VM.
Types
The following types are used to specify methods and fields in the API Reference:
string
: Text strings.int
: 64-bit integers.float
: IEEE double-precision floating-point numbers.bool
: Boolean.datetime
: Date and timestamp.c ref
: Reference to an object of classc
.t set
: Arbitrary-length set of values of typet
.(k -> v) map
: Mapping from values of typek
to values of typev
.e enum
: Enumeration type with namee
. Enums are defined in the API reference together with classes that use them.
Note that there are a number of cases where ref
s are doubly linked.
For example, a VM
has a field called VIFs
of type VIF ref set
;
this field lists the network interfaces attached to a particular VM.
Similarly, the VIF
class has a field called VM
of type VM ref
which references the VM to which the interface is connected.
These two fields are bound together, in the sense that
creating a new VIF causes the VIFs
field of the corresponding
VM object to be updated automatically.
The API reference lists explicitly the fields that are bound together in this way. It also contains a diagram that shows relationships between classes. In this diagram an edge signifies the existence of a pair of fields that are bound together, using standard crows-foot notation to signify the type of relationship (e.g. one-many, many-many).
RPCs associated with fields
Each field, f
, has an RPC accessor associated with it that returns f
’s value:
get_f (r)
: takes aref
,r
that refers to an object and returns the value off
.
Each field, f
, with qualifier RW and whose outermost type is set
has the
following additional RPCs associated with it:
add_f(r, v)
: adds a new elementv
to the set. Note that sets cannot contain duplicate values, hence this operation has no action in the case thatv
is already in the set.remove_f(r, v)
: removes elementv
from the set.
Each field, f
, with qualifier RW and whose outermost type is map
has the
following additional RPCs associated with it:
add_to_f(r, k, v)
: adds new pairk -> v
to the mapping stored inf
in objectr
. Attempting to add a new pair for duplicate key,k
, fails with aMAP_DUPLICATE_KEY
error.remove_from_f(r, k)
: removes the pair with keyk
from the mapping stored inf
in objectr
.
Each field whose outermost type is neither set
nor map
, but whose
qualifier is RW has an RPC accessor associated with it that sets its value:
set_f(r, v)
: sets the fieldf
on objectr
to valuev
.
RPCs associated with classes
Most classes have a constructor RPC named
create
that takes as parameters all fields marked RW and RO/constructor. The result of this RPC is that a new persistent object is created on the server-side with the specified field values.Each class has a
get_by_uuid(uuid)
RPC that returns the object of that class that has the specifieduuid
.Each class that has a
name_label
field has aget_by_name_label(name_label)
RPC that returns a set of objects of that class that have the specifiedname_label
.Most classes have a
destroy(r)
RPC that explicitly deletes the persistent object specified byr
from the system. This is a non-cascading delete - if the object being removed is referenced by another object then thedestroy
call will fail.
Apart from the RPCs enumerated above, most classes have additional RPCs
associated with them. For example, the VM
class has RPCs for cloning,
suspending, starting etc. Such additional RPCs are described explicitly
in the API reference.
Wire Protocol
API calls are sent over a network to a Xen-enabled host using an RPC protocol. Here we describe how the higher-level types used in our API Reference are mapped to primitive RPC types, covering the two supported wire formats XML-RPC and JSON-RPC.
XML-RPC Protocol
We specify the signatures of API functions in the following style:
(VM ref set) VM.get_all()
This specifies that the function with name VM.get_all
takes
no parameters and returns a set
of VM ref
.
These types are mapped onto XML-RPC types in a straight-forward manner:
the types
float
,bool
,datetime
, andstring
map directly to the XML-RPC<double>
,<boolean>
,<dateTime.iso8601>
, and<string>
elements.all
ref
types are opaque references, encoded as the XML-RPC’s<string>
type. Users of the API should not make assumptions about the concrete form of these strings and should not expect them to remain valid after the client’s session with the server has terminated.fields named
uuid
of typestring
are mapped to the XML-RPC<string>
type. The string itself is the OSF DCE UUID presentation format (as output byuuidgen
).int
is assumed to be 64-bit in our API and is encoded as a string of decimal digits (rather than using XML-RPC’s built-in 32-bit<i4>
type).values of
enum
types are encoded as strings. For example, the valuedestroy
ofenum on_normal_exit
, would be conveyed as:
<value><string>destroy</string></value>
- for all our types,
t
, our typet set
simply maps to XML-RPC’s<array>
type, so, for example, a value of typestring set
would be transmitted like this:
<array>
<data>
<value><string>CX8</string></value>
<value><string>PSE36</string></value>
<value><string>FPU</string></value>
</data>
</array>
- for types
k
andv
, our type(k -> v) map
maps onto an XML-RPC<struct>
, with the key as the name of the struct. Note that the(k -> v) map
type is only valid whenk
is astring
,ref
, orint
, and in each case the keys of the maps are stringified as above. For example, the(string -> float) map
containing the mappings Mike -> 2.3 and John -> 1.2 would be represented as:
<value>
<struct>
<member>
<name>Mike</name>
<value><double>2.3</double></value>
</member>
<member>
<name>John</name>
<value><double>1.2</double></value>
</member>
</struct>
</value>
- our
void
type is transmitted as an empty string.
XML-RPC Return Values and Status Codes
The return value of an RPC call is an XML-RPC <struct>
.
- The first element of the struct is named
Status
; it contains a string value indicating whether the result of the call was aSuccess
or aFailure
.
If the Status
is Success
then the struct contains a second element named
Value
:
- The element of the struct named
Value
contains the function’s return value.
If the Status
is Failure
then the struct contains a second element named
ErrorDescription
:
- The element of the struct named
ErrorDescription
contains an array of string values. The first element of the array is an error code; the rest of the elements are strings representing error parameters relating to that code.
For example, an XML-RPC return value from the host.get_resident_VMs
function
may look like this:
<struct>
<member>
<name>Status</name>
<value>Success</value>
</member>
<member>
<name>Value</name>
<value>
<array>
<data>
<value>81547a35-205c-a551-c577-00b982c5fe00</value>
<value>61c85a22-05da-b8a2-2e55-06b0847da503</value>
<value>1d401ec4-3c17-35a6-fc79-cee6bd9811fe</value>
</data>
</array>
</value>
</member>
</struct>
JSON-RPC Protocol
We specify the signatures of API functions in the following style:
(VM ref set) VM.get_all()
This specifies that the function with name VM.get_all
takes no parameters and
returns a set
of VM ref
. These types are mapped onto JSON-RPC types in the
following manner:
the types
float
andbool
map directly to the JSON typesnumber
andboolean
, whiledatetime
andstring
are represented as the JSONstring
type.all
ref
types are opaque references, encoded as the JSONstring
type. Users of the API should not make assumptions about the concrete form of these strings and should not expect them to remain valid after the client’s session with the server has terminated.fields named
uuid
of typestring
are mapped to the JSONstring
type. The string itself is the OSF DCE UUID presentation format (as output byuuidgen
).int
is assumed to be 64-bit in our API and is encoded as a JSONnumber
without decimal point or exponent, preserved as a string.values of
enum
types are encoded as the JSONstring
type. For example, the valuedestroy
ofenum on_normal_exit
, would be conveyed as:
"destroy"
- for all our types,
t
, our typet set
simply maps to the JSONarray
type, so, for example, a value of typestring set
would be transmitted like this:
[ "CX8", "PSE36", "FPU" ]
- for types
k
andv
, our type(k -> v) map
maps onto a JSON object which contains members with namek
and valuev
. Note that the(k -> v) map
type is only valid whenk
is astring
,ref
, orint
, and in each case the keys of the maps are stringified as above. For example, the(string -> float) map
containing the mappings Mike -> 2.3 and John -> 1.2 would be represented as:
{
"Mike": 2.3,
"John": 1.2
}
- our
void
type is transmitted as an empty string.
Both versions 1.0 and 2.0 of the JSON-RPC wire format are recognised and, depending on your client library, you can use either of them.
JSON-RPC v1.0
JSON-RPC v1.0 Requests
An API call is represented by sending a single JSON object to the server, which
contains the members method
, params
, and id
.
method
: A JSONstring
containing the name of the function to be invoked.params
: A JSONarray
of values, which represents the parameters of the function to be invoked.id
: A JSONstring
orinteger
representing the call id. Note that, diverging from the JSON-RPC v1.0 specification the API does not accept notification requests (requests without responses), i.e. the id cannot benull
.
For example, the body of a JSON-RPC v1.0 request to retrieve the resident VMs of a host may look like this:
{
"method": "host.get_resident_VMs",
"params": [
"OpaqueRef:74f1a19cd-b660-41e3-a163-10f03e0eae67",
"OpaqueRef:08c34fc9-f418-4f09-8274-b9cb25cd8550"
],
"id": "xyz"
}
In the above example, the first element of the params
array is the reference
of the open session to the host, while the second is the host reference.
JSON-RPC v1.0 Return Values
The return value of a JSON-RPC v1.0 call is a single JSON object containing
the members result
, error
, and id
.
result
: If the call is successful, it is a JSON value (string
,array
etc.) representing the return value of the invoked function. If an error has occurred, it isnull
.error
: If the call is successful, it isnull
. If the call has failed, it a JSONarray
ofstring
values. The first element of the array is an error code; the remainder of the array are strings representing error parameters relating to that code.id
: The call id. It is a JSONstring
orinteger
and it is the same id as the request it is responding to.
For example, a JSON-RPC v1.0 return value from the host.get_resident_VMs
function may look like this:
{
"result": [
"OpaqueRef:604f51e7-630f-4412-83fa-b11c6cf008ab",
"OpaqueRef:670d08f5-cbeb-4336-8420-ccd56390a65f"
],
"error": null,
"id": "xyz"
}
while the return value of the same call made on a logged out session may look like this:
{
"result": null,
"error": [
"SESSION_INVALID",
"OpaqueRef:93f1a23cd-a640-41e3-b163-10f86e0eae67"
],
"id": "xyz"
}
JSON-RPC v2.0
JSON-RPC v2.0 Requests
An API call is represented by sending a single JSON object to the server, which
contains the members jsonrpc
, method
, params
, and id
.
jsonrpc
: A JSONstring
specifying the version of the JSON-RPC protocol. It is exactly “2.0”.method
: A JSONstring
containing the name of the function to be invoked.params
: A JSONarray
of values, which represents the parameters of the function to be invoked. Although the JSON-RPC v2.0 specification allows this member to be omitted, in practice all API calls accept at least one parameter.id
: A JSONstring
orinteger
representing the call id. Note that, diverging from the JSON-RPC v2.0 specification it cannot be null. Neither can it be omitted because the API does not accept notification requests (requests without responses).
For example, the body of a JSON-RPC v2.0 request to retrieve the VMs resident on a host may look like this:
{
"jsonrpc": "2.0",
"method": "host.get_resident_VMs",
"params": [
"OpaqueRef:c90cd28f-37ec-4dbf-88e6-f697ccb28b39",
"OpaqueRef:08c34fc9-f418-4f09-8274-b9cb25cd8550"
],
"id": 3
}
As before, the first element of the parameter
array is the reference
of the open session to the host, while the second is the host reference.
JSON-RPC v2.0 Return Values
The return value of a JSON-RPC v2.0 call is a single JSON object containing the
members jsonrpc
, either result
or error
depending on the outcome of the
call, and id
.
jsonrpc
: A JSONstring
specifying the version of the JSON-RPC protocol. It is exactly “2.0”.result
: If the call is successful, it is a JSON value (string
,array
etc.) representing the return value of the invoked function. If an error has occurred, it does not exist.error
: If the call is successful, it does not exist. If the call has failed, it is a single structured JSON object (see below).id
: The call id. It is a JSONstring
orinteger
and it is the same id as the request it is responding to.
The error
object contains the members code
, message
, and data
.
code
: The API does not make use of this member and only retains it for compliance with the JSON-RPC v2.0 specification. It is a JSONinteger
which has a non-zero value.message
: A JSONstring
representing an API error code.data
: A JSON array ofstring
values representing error parameters relating to the aforementioned API error code.
For example, a JSON-RPC v2.0 return value from the host.get_resident_VMs
function may look like this:
{
"jsonrpc": "2.0",
"result": [
"OpaqueRef:604f51e7-630f-4412-83fa-b11c6cf008ab",
"OpaqueRef:670d08f5-cbeb-4336-8420-ccd56390a65f"
],
"id": 3
}
while the return value of the same call made on a logged out session may look like this:
{
"jsonrpc": "2.0",
"error": {
"code": 1,
"message": "SESSION_INVALID",
"data": [
"OpaqueRef:c90cd28f-37ec-4dbf-88e6-f697ccb28b39"
]
},
"id": 3
}
Errors
When a low-level transport error occurs, or a request is malformed at the HTTP or RPC level, the server may send an HTTP 500 error response, or the client may simulate the same. The client must be prepared to handle these errors, though they may be treated as fatal.
For example, the following malformed request when using the XML-RPC protocol:
$curl -D - -X POST https://server -H 'Content-Type: application/xml' \
-d '<?xml version="1.0"?>
<methodCall>
<methodName>session.logout</methodName>
</methodCall>'
results to the following response:
HTTP/1.1 500 Internal Error
content-length: 297
content-type:text/html
connection:close
cache-control:no-cache, no-store
<html><body><h1>HTTP 500 internal server error</h1>An unexpected error occurred;
please wait a while and try again. If the problem persists, please contact your
support representative.<h1> Additional information </h1>Xmlrpc.Parse_error(&quo
t;close_tag", "open_tag", _)</body></html>
When using the JSON-RPC protocol:
$curl -D - -X POST https://server/jsonrpc -H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "session.login_with_password",
"id": 0
}'
the response is:
HTTP/1.1 500 Internal Error
content-length: 308
content-type:text/html
connection:close
cache-control:no-cache, no-store
<html><body><h1>HTTP 500 internal server error</h1>An unexpected error occurred;
please wait a while and try again. If the problem persists, please contact your
support representative.<h1> Additional information </h1>Jsonrpc.Malformed_metho
d_request("{jsonrpc=...,method=...,id=...}")</body></html>
All other failures are reported with a more structured error response, to allow better automatic response to failures, proper internationalization of any error message, and easier debugging.
On the wire, these are transmitted like this when using the XML-RPC protocol:
<struct>
<member>
<name>Status</name>
<value>Failure</value>
</member>
<member>
<name>ErrorDescription</name>
<value>
<array>
<data>
<value>MAP_DUPLICATE_KEY</value>
<value>Customer</value>
<value>eSpiel Inc.</value>
<value>eSpiel Incorporated</value>
</data>
</array>
</value>
</member>
</struct>
Note that ErrorDescription
value is an array of string values. The
first element of the array is an error code; the remainder of the array are
strings representing error parameters relating to that code. In this case,
the client has attempted to add the mapping Customer ->
eSpiel Incorporated to a Map, but it already contains the mapping
Customer -> eSpiel Inc., hence the request has failed.
When using the JSON-RPC protocol v2.0, the above error is transmitted as:
{
"jsonrpc": "2.0",
"error": {
"code": 1,
"message": "MAP_DUPLICATE_KEY",
"data": [
"Customer",
"eSpiel Inc.",
"eSpiel Incorporated"
]
},
"id": 3
}
Finally, when using the JSON-RPC protocol v1.0:
{
"result": null,
"error": [
"MAP_DUPLICATE_KEY",
"Customer",
"eSpiel Inc.",
"eSpiel Incorporated"
],
"id": "xyz"
}
Each possible error code is documented in the last section of the API reference.
Note on References vs UUIDs
References are opaque types - encoded as XML-RPC and JSON-RPC strings on the wire - understood only by the particular server which generated them. Servers are free to choose any concrete representation they find convenient; clients should not make any assumptions or attempt to parse the string contents. References are not guaranteed to be permanent identifiers for objects; clients should not assume that references generated during one session are valid for any future session. References do not allow objects to be compared for equality. Two references to the same object are not guaranteed to be textually identical.
UUIDs are intended to be permanent identifiers for objects. They are
guaranteed to be in the OSF DCE UUID presentation format (as output by uuidgen
).
Clients may store UUIDs on disk and use them to look up objects in subsequent sessions
with the server. Clients may also test equality on objects by comparing UUID strings.
The API provides mechanisms for translating between UUIDs and opaque references. Each class that contains a UUID field provides:
A
get_by_uuid
method that takes a UUID and returns an opaque reference to the server-side object that has that UUID;A
get_uuid
function (a regular “field getter” RPC) that takes an opaque reference and returns the UUID of the server-side object that is referenced by it.
Making RPC Calls
Transport Layer
The following transport layers are currently supported:
- HTTP/HTTPS for remote administration
- HTTP over Unix domain sockets for local administration
Session Layer
The RPC interface is session-based; before you can make arbitrary RPC calls you must login and initiate a session. For example:
(session ref) session.login_with_password(string uname, string pwd,
string version, string originator)
where uname
and password
refer to your username and password, as defined by
the Xen administrator, while version
and originator
are optional. The
session ref
returned by session.login_with_password
is passed
to subsequent RPC calls as an authentication token. Note that a session
reference obtained by a login request to the XML-RPC backend can be used in
subsequent requests to the JSON-RPC backend, and vice versa.
A session can be terminated with the session.logout
function:
void session.logout(session ref session_id)
Synchronous and Asynchronous Invocation
Each method call (apart from methods on the Session
and Task
objects and
“getters” and “setters” derived from fields) can be made either synchronously or
asynchronously. A synchronous RPC call blocks until the
return value is received; the return value of a synchronous RPC call is
exactly as specified above.
Only synchronous API calls are listed explicitly in this document.
All their asynchronous counterparts are in the special Async
namespace.
For example, the synchronous call VM.clone(...)
has an asynchronous
counterpart, Async.VM.clone(...)
, that is non-blocking.
Instead of returning its result directly, an asynchronous RPC call
returns an identifier of type task ref
which is subsequently used
to track the status of a running asynchronous RPC.
Note that an asynchronous call may fail immediately, before a task has even been
created. When using the XML-RPC wire protocol, this eventuality is represented
by wrapping the returned task ref
in an XML-RPC struct with a Status
,
ErrorDescription
, and Value
fields, exactly as specified above; the
task ref
is provided in the Value
field if Status
is set to Success
.
When using the JSON-RPC protocol, the task ref
is wrapped in a response JSON
object as specified above and it is provided by the value of the result
member
of a successful call.
The RPC call
(task ref set) Task.get_all(session ref session_id)
returns a set of all task identifiers known to the system. The status (including any
returned result and error codes) of these can then be queried by accessing the
fields of the Task
object in the usual way. Note that, in order to get a
consistent snapshot of a task’s state, it is advisable to call the get_record
function.
Example interactive session
This section describes how an interactive session might look, using python XML-RPC and JSON-RPC client libraries.
First, initialise python:
$ python3
>>>
Using the XML-RPC Protocol
Import the library xmlrpc.client
and create a
python object referencing the remote server as shown below:
>>> import xmlrpc.client
>>> xen = xmlrpc.client.ServerProxy("https://localhost:443")
Note that you may need to disable SSL certificate validation to establish the connection, this can be done as follows:
>>> import ssl
>>> ctx = ssl._create_unverified_context()
>>> xen = xmlrpc.client.ServerProxy("https://localhost:443", context=ctx)
Acquire a session reference by logging in with a username and password; the
session reference is returned under the key Value
in the resulting dictionary
(error-handling omitted for brevity):
>>> session = xen.session.login_with_password("user", "passwd",
... "version", "originator")['Value']
This is what the call looks like when serialized
<?xml version='1.0'?>
<methodCall>
<methodName>session.login_with_password</methodName>
<params>
<param><value><string>user</string></value></param>
<param><value><string>passwd</string></value></param>
<param><value><string>version</string></value></param>
<param><value><string>originator</string></value></param>
</params>
</methodCall>
Next, the user may acquire a list of all the VMs known to the system (note the call takes the session reference as the only parameter):
>>> all_vms = xen.VM.get_all(session)['Value']
>>> all_vms
['OpaqueRef:1', 'OpaqueRef:2', 'OpaqueRef:3', 'OpaqueRef:4' ]
The VM references here have the form OpaqueRef:X
(though they may not be
that simple in reality) and you should treat them as opaque strings.
Templates are VMs with the is_a_template
field set to true
. We can
find the subset of template VMs using a command like the following:
>>> all_templates = filter(lambda x: xen.VM.get_is_a_template(session, x)['Value'],
all_vms)
Once a reference to a VM has been acquired, a lifecycle operation may be invoked:
>>> xen.VM.start(session, all_templates[0], False, False)
{'Status': 'Failure', 'ErrorDescription': ['VM_IS_TEMPLATE', 'OpaqueRef:X']}
In this case the start
message has been rejected, because the VM is
a template, and so an error response has been returned. These high-level
errors are returned as structured data (rather than as XML-RPC faults),
allowing them to be internationalized.
Rather than querying fields individually, whole records may be returned at once. To retrieve the record of a single object as a python dictionary:
>>> record = xen.VM.get_record(session, all_templates[0])['Value']
>>> record['power_state']
'Halted'
>>> record['name_label']
'Windows 10 (64-bit)'
To retrieve all the VM records in a single call:
>>> records = xen.VM.get_all_records(session)['Value']
>>> list(records.keys())
['OpaqueRef:1', 'OpaqueRef:2', 'OpaqueRef:3', 'OpaqueRef:4' ]
>>> records['OpaqueRef:1']['name_label']
'Red Hat Enterprise Linux 7'
Using the JSON-RPC Protocol
For this example we are making use of the package jsonrpcclient
and the
requests
library due to their simplicity, although other packages can also be
used.
First, import the requests
and jsonrpcclient
libraries:
>>> import requests
>>> import jsonrpcclient
Now we construct a utility method to make using these libraries easier:
>>> def jsonrpccall(method, params):
... r = requests.post("https://localhost:443/jsonrpc",
... json=jsonrpcclient.request(method, params=params),
... verify=False)
... p = jsonrpcclient.parse(r.json())
... if isinstance(p, jsonrpcclient.Ok):
... return p.result
... raise Exception(p.message, p.data)
Acquire a session reference by logging in with a username and password:
>>> session = jsonrpccall("session.login_with_password",
... ("user", "password", "version", "originator"))
jsonrpcclient
uses the JSON-RPC protocol v2.0, so this is what the serialized
request looks like:
{
"jsonrpc": "2.0",
"method": "session.login_with_password",
"params": ["user", "passwd", "version", "originator"],
"id": 0
}
Next, the user may acquire a list of all the VMs known to the system (note the call takes the session reference as the only parameter):
>>> all_vms = jsonrpccall("VM.get_all", (session,))
>>> all_vms
['OpaqueRef:1', 'OpaqueRef:2', 'OpaqueRef:3', 'OpaqueRef:4' ]
The VM references here have the form OpaqueRef:X
(though they may not be
that simple in reality) and you should treat them as opaque strings.
Templates are VMs with the is_a_template
field set to true
. We can
find the subset of template VMs using a command like the following:
>>> all_templates = filter(
... lambda x: jsonrpccall("VM.get_is_a_template", (session, x)),
... all_vms)
Once a reference to a VM has been acquired, a lifecycle operation may be invoked:
>>> try:
... jsonrpccall("VM.start", (session, next(all_templates), False, False))
... except Exception as e:
... e
...
Exception('VM_IS_TEMPLATE', ['OpaqueRef:1', 'start'])
In this case the start
message has been rejected because the VM is
a template, hence an error response has been returned. These high-level
errors are returned as structured data, allowing them to be internationalized.
Rather than querying fields individually, whole records may be returned at once. To retrieve the record of a single object as a python dictionary:
>>> record = jsonrpccall("VM.get_record", (session, next(all_templates)))
>>> record['power_state']
'Halted'
>>> record['name_label']
'Windows 10 (64-bit)'
To retrieve all the VM records in a single call:
>>> records = jsonrpccall("VM.get_all_records", (session,))
>>> records.keys()
['OpaqueRef:1', 'OpaqueRef:2', 'OpaqueRef:3', 'OpaqueRef:4' ]
>>> records['OpaqueRef:1']['name_label']
'Red Hat Enterprise Linux 7'
Overview of the XenAPI
This chapter introduces the XenAPI and its associated object model. The API has the following key features:
Management of all aspects of the XenServer Host. The API allows you to manage VMs, storage, networking, host configuration and pools. Performance and status metrics can also be queried from the API.
Persistent Object Model. The results of all side-effecting operations (e.g. object creation, deletion and parameter modifications) are persisted in a server-side database that is managed by the XenServer installation.
An event mechanism. Through the API, clients can register to be notified when persistent (server-side) objects are modified. This enables applications to keep track of datamodel modifications performed by concurrently executing clients.
Synchronous and asynchronous invocation. All API calls can be invoked synchronously (that is, block until completion); any API call that may be long-running can also be invoked asynchronously. Asynchronous calls return immediately with a reference to a task object. This task object can be queried (through the API) for progress and status information. When an asynchronously invoked operation completes, the result (or error code) is available from the task object.
Remotable and Cross-Platform. The client issuing the API calls does not have to be resident on the host being managed; nor does it have to be connected to the host over ssh in order to execute the API. API calls make use of the XML-RPC protocol to transmit requests and responses over the network.
Secure and Authenticated Access. The XML-RPC API server executing on the host accepts secure socket connections. This allows a client to execute the APIs over the https protocol. Further, all the API calls execute in the context of a login session generated through username and password validation at the server. This provides secure and authenticated access to the XenServer installation.
Getting Started with the API
We will start our tour of the API by describing the calls required to create a new VM on a XenServer installation, and take it through a start/suspend/resume/stop cycle. This is done without reference to code in any specific language; at this stage we just describe the informal sequence of RPC invocations that accomplish our “install and start” task.
Authentication: acquiring a session reference
The first step is to call Session.login_with_password(, , , )
. The API is session based, so before you can make other calls you will need to authenticate with the server. Assuming the username and password are authenticated correctly, the result of this call is a session reference. Subsequent API calls take the session reference as a parameter. In this way we ensure that only API users who are suitably authorized can perform operations on a XenServer installation. You can continue to use the same session for any number of API calls. When you have finished the session, Citrix recommends that you call Session.logout(session)
to clean up: see later.
Acquiring a list of templates to base a new VM installation on
The next step is to query the list of “templates” on the host. Templates are specially-marked VM objects that specify suitable default parameters for a variety of supported guest types. (If you want to see a quick enumeration of the templates on a XenServer installation for yourself then you can execute the xe template-list
CLI command.) To get a list of templates from the API, we need to find the VM objects on the server that have their is_a_template
field set to true. One way to do this by calling VM.get_all_records(session)
where the session parameter is the reference we acquired from our Session.login_with_password
call earlier. This call queries the server, returning a snapshot (taken at the time of the call) containing all the VM object references and their field values.
(Remember that at this stage we are not concerned about the particular mechanisms by which the returned object references and field values can be manipulated in any particular client language: that detail is dealt with by our language-specific API bindings and described concretely in the following chapter. For now it suffices just to assume the existence of an abstract mechanism for reading and manipulating objects and field values returned by API calls.)
Now that we have a snapshot of all the VM objects’ field values in the memory of our client application we can simply iterate through them and find the ones that have their “is_a_template
” set to true. At this stage let’s assume that our example application further iterates through the template objects and remembers the reference corresponding to the one that has its “name_label
” set to “Debian Etch 4.0” (one of the default Linux templates supplied with XenServer).
Installing the VM based on a template
Continuing through our example, we must now install a new VM based on the template we selected. The installation process requires 4 API calls:
First we must now invoke the API call
VM.clone(session, t_ref, "my first VM")
. This tells the server to clone the VM object referenced byt_ref
in order to make a new VM object. The return value of this call is the VM reference corresponding to the newly-created VM. Let’s call thisnew_vm_ref
.Next, we need to specify the UUID of the Storage Repository where the VM’s disks will be instantiated. We have to put this in the
sr
attribute in the disk provisioning XML stored under the “disks
” key in theother_config
map of the newly-created VM. This field can be updated by calling its getter (other_config <- VM.get_other_config(session, new_vm_ref)
) and then its setter (VM.set_other_config(session, new_vm_ref, other_config)
) with the modifiedother_config
map.At this stage the object referred to by
new_vm_ref
is still a template (just like the VM object referred to byt_ref
, from which it was cloned). To makenew_vm_ref
into a VM object we need to callVM.provision(session, new_vm_ref)
. When this call returns thenew_vm_ref
object will have had itsis_a_template
field set to false, indicating thatnew_vm_ref
now refers to a regular VM ready for starting.
Note
The provision operation may take a few minutes, as it is as during this call that the template’s disk images are created. In the case of the Debian template, the newly created disks are also at this stage populated with a Debian root filesystem.
Taking the VM through a start/suspend/resume/stop cycle
Now we have an object reference representing our newly-installed VM, it is trivial to take it through a few lifecycle operations:
To start our VM we can just call
VM.start(session, new_vm_ref)
After it’s running, we can suspend it by calling
VM.suspend(session, new_vm_ref)
,and then resume it by calling
VM.resume(session, new_vm_ref)
.We can call
VM.shutdown(session, new_vm_ref)
to shutdown the VM cleanly.
Logging out
Once an application is finished interacting with a XenServer Host it is good practice to call Session.logout(session)
. This invalidates the session reference (so it cannot be used in subsequent API calls) and simultaneously deallocates server-side memory used to store the session object.
Although inactive sessions will eventually timeout, the server has a hardcoded limit of 500 concurrent sessions for each username
or originator
. Once this limit has been reached fresh logins will evict the session objects that have been used least recently, causing their associated session references to become invalid. For successful interoperability with other applications, concurrently accessing the server, the best policy is:
Choose a string that identifies your application and its version.
Create a single session at start-of-day, using that identifying string for the
originator
parameter toSession.login_with_password
.Use this session throughout the application (note that sessions can be used across multiple separate client-server network connections) and then explicitly logout when possible.
If a poorly written client leaks sessions or otherwise exceeds the limit, then as long as the client uses an appropriate originator
argument, it will be easily identifiable from the XenServer logs and XenServer will destroy the longest-idle sessions of the rogue client only; this may cause problems for that client but not for other clients. If the misbehaving client did not specify an originator
, it would be harder to identify and would cause the premature destruction of sessions of any clients that also did not specify an originator
Install and start example: summary
We have seen how the API can be used to install a VM from a XenServer template and perform a number of lifecycle operations on it. You will note that the number of calls we had to make in order to affect these operations was small:
One call to acquire a session:
Session.login_with_password()
One call to query the VM (and template) objects present on the XenServer installation:
VM.get_all_records()
. Recall that we used the information returned from this call to select a suitable template to install from.Four calls to install a VM from our chosen template:
VM.clone()
, followed by the getter and setter of theother_config
field to specify where to create the disk images of the template, and thenVM.provision()
.One call to start the resultant VM:
VM.start()
(and similarly other single calls to suspend, resume and shutdown accordingly)And then one call to logout
Session.logout()
The take-home message here is that, although the API as a whole is complex and fully featured, common tasks (such as creating and performing lifecycle operations on VMs) are very straightforward to perform, requiring only a small number of simple API calls. Keep this in mind while you study the next section which may, on first reading, appear a little daunting!
Object Model Overview
This section gives a high-level overview of the object model of the API. A more detailed description of the parameters and methods of each class outlined here can be found in the XenServer API Reference document.
We start by giving a brief outline of some of the core classes that make up the API. (Don’t worry if these definitions seem somewhat abstract in their initial presentation; the textual description in subsequent sections, and the code-sample walk through in the next Chapter will help make these concepts concrete.)
Class | Description |
---|---|
VM | A VM object represents a particular virtual machine instance on a XenServer Host or Resource Pool. Example methods include start , suspend , pool_migrate ; example parameters include power_state , memory_static_max , and name_label . (In the previous section we saw how the VM class is used to represent both templates and regular VMs) |
Host | A host object represents a physical host in a XenServer pool. Example methods include reboot and shutdown . Example parameters include software_version , hostname , and [IP] address . |
VDI | A VDI object represents a Virtual Disk Image. Virtual Disk Images can be attached to VMs, in which case a block device appears inside the VM through which the bits encapsulated by the Virtual Disk Image can be read and written. Example methods of the VDI class include “resize” and “clone”. Example fields include “virtual_size” and “sharable”. (When we called VM.provision on the VM template in our previous example, some VDI objects were automatically created to represent the newly created disks, and attached to the VM object.) |
SR | An SR (Storage Repository) aggregates a collection of VDIs and encapsulates the properties of physical storage on which the VDIs’ bits reside. Example parameters include type (which determines the storage-specific driver a XenServer installation uses to read/write the SR’s VDIs) and physical_utilisation ; example methods include scan (which invokes the storage-specific driver to acquire a list of the VDIs contained with the SR and the properties of these VDIs) and create (which initializes a block of physical storage so it is ready to store VDIs). |
Network | A network object represents a layer-2 network that exists in the environment in which the XenServer Host instance lives. Since XenServer does not manage networks directly this is a lightweight class that serves merely to model physical and virtual network topology. VM and Host objects that are attached to a particular Network object (by virtue of VIF and PIF instances – see below) can send network packets to each other. |
At this point, readers who are finding this enumeration of classes rather terse may wish to skip to the code walk-throughs of the next chapter: there are plenty of useful applications that can be written using only a subset of the classes already described! For those who wish to continue this description of classes in the abstract, read on.
On top of the classes listed above, there are 4 more that act as connectors, specifying relationships between VMs and Hosts, and Storage and Networks. The first 2 of these classes that we will consider, VBD and VIF, determine how VMs are attached to virtual disks and network objects respectively:
Class | Description |
---|---|
VBD | A VBD (Virtual Block Device) object represents an attachment between a VM and a VDI. When a VM is booted its VBD objects are queried to determine which disk images (VDIs) should be attached. Example methods of the VBD class include “plug” (which hot plugs a disk device into a running VM, making the specified VDI accessible therein) and “unplug” (which hot unplugs a disk device from a running guest); example fields include “device” (which determines the device name inside the guest under which the specified VDI will be made accessible). |
VIF | A VIF (Virtual network InterFace) object represents an attachment between a VM and a Network object. When a VM is booted its VIF objects are queried to determine which network devices should be created. Example methods of the VIF class include “plug” (which hot plugs a network device into a running VM) and “unplug” (which hot unplugs a network device from a running guest). |
The second set of “connector classes” that we will consider determine how Hosts are attached to Networks and Storage.
Class | Description |
---|---|
PIF | A PIF (Physical InterFace) object represents an attachment between a Host and a Network object. If a host is connected to a Network (over a PIF) then packets from the specified host can be transmitted/received by the corresponding host. Example fields of the PIF class include “device” (which specifies the device name to which the PIF corresponds – e.g. eth0) and “MAC” (which specifies the MAC address of the underlying NIC that a PIF represents). Note that PIFs abstract both physical interfaces and VLANs (the latter distinguished by the existence of a positive integer in the “VLAN” field). |
PBD | A PBD (Physical Block Device) object represents an attachment between a Host and a SR (Storage Repository) object. Fields include “currently-attached” (which specifies whether the chunk of storage represented by the specified SR object) is currently available to the host; and “device_config” (which specifies storage-driver specific parameters that determines how the low-level storage devices are configured on the specified host – e.g. in the case of an SR rendered on an NFS filer, device_config may specify the host-name of the filer and the path on the filer in which the SR files live.). |
The figure above presents a graphical overview of the API classes involved in managing VMs, Hosts, Storage and Networking. From this diagram, the symmetry between storage and network configuration, and also the symmetry between virtual machine and host configuration is plain to see.
Working with VIFs and VBDs
In this section we walk through a few more complex scenarios, describing informally how various tasks involving virtual storage and network devices can be accomplished using the API.
Creating disks and attaching them to VMs
Let’s start by considering how to make a new blank disk image and attach it to a running VM. We will assume that we already have ourselves a running VM, and we know its corresponding API object reference (e.g. we may have created this VM using the procedure described in the previous section, and had the server return its reference to us.) We will also assume that we have authenticated with the XenServer installation and have a corresponding session reference
. Indeed in the rest of this chapter, for the sake of brevity, we will stop mentioning sessions altogether.
Creating a new blank disk image
The first step is to instantiate the disk image on physical storage. We do this by calling VDI.create()
. The VDI.create
call takes a number of parameters, including:
name_label
andname_description
: a human-readable name/description for the disk (e.g. for convenient display in the UI etc.). These fields can be left blank if desired.SR
: the object reference of the Storage Repository representing the physical storage in which the VDI’s bits will be placed.read_only
: setting this field to true indicates that the VDI can only be attached to VMs in a read-only fashion. (Attempting to attach a VDI with itsread_only
field set to true in a read/write fashion results in error.)
Invoking the VDI.create
call causes the XenServer installation to create a blank disk image on physical storage, create an associated VDI object (the datamodel instance that refers to the disk image on physical storage) and return a reference to this newly created VDI object.
The way in which the disk image is represented on physical storage depends on the type of the SR in which the created VDI resides. For example, if the SR is of type “lvm” then the new disk image will be rendered as an LVM volume; if the SR is of type “nfs” then the new disk image will be a sparse VHD file created on an NFS filer. (You can query the SR type through the API using the SR.get_type()
call.)
Note
Some SR types might round up the
virtual-size
value to make it divisible by a configured block size.
Attaching the disk image to a VM
So far we have a running VM (that we assumed the existence of at the start of this example) and a fresh VDI that we just created. Right now, these are both independent objects that exist on the XenServer Host, but there is nothing linking them together. So our next step is to create such a link, associating the VDI with our VM.
The attachment is formed by creating a new “connector” object called a VBD (Virtual Block Device). To create our VBD we invoke the VBD.create()
call. The VBD.create()
call takes a number of parameters including:
VM
- the object reference of the VM to which the VDI is to be attachedVDI
- the object reference of the VDI that is to be attachedmode
- specifies whether the VDI is to be attached in a read-only or a read-write fashionuserdevice
- specifies the block device inside the guest through which applications running inside the VM will be able to read/write the VDI’s bits.type
- specifies whether the VDI should be presented inside the VM as a regular disk or as a CD. (Note that this particular field has more meaning for Windows VMs than it does for Linux VMs, but we will not explore this level of detail in this chapter.)
Invoking VBD.create
makes a VBD object on the XenServer installation and returns its object reference. However, this call in itself does not have any side-effects on the running VM (that is, if you go and look inside the running VM you will see that the block device has not been created). The fact that the VBD object exists but that the block device in the guest is not active, is reflected by the fact that the VBD object’s currently_attached
field is set to false.
For expository purposes, the figure above presents a graphical example that shows the relationship between VMs, VBDs, VDIs and SRs. In this instance a VM object has 2 attached VDIs: there are 2 VBD objects that form the connections between the VM object and its VDIs; and the VDIs reside within the same SR.
Hotplugging the VBD
If we rebooted the VM at this stage then, after rebooting, the block device corresponding to the VBD would appear: on boot, XenServer queries all VBDs of a VM and actively attaches each of the corresponding VDIs.
Rebooting the VM is all very well, but recall that we wanted to attach a newly created blank disk to a running VM. This can be achieved by invoking the plug
method on the newly created VBD object. When the plug
call returns successfully, the block device to which the VBD relates will have appeared inside the running VM – i.e. from the perspective of the running VM, the guest operating system is led to believe that a new disk device has just been hot plugged. Mirroring this fact in the managed world of the API, the currently_attached
field of the VBD is set to true.
Unsurprisingly, the VBD plug
method has a dual called “unplug
”. Invoking the unplug
method on a VBD object causes the associated block device to be hot unplugged from a running VM, setting the currently_attached
field of the VBD object to false accordingly.
Creating and attaching Network Devices to VMs
The API calls involved in configuring virtual network interfaces in VMs are similar in many respects to the calls involved in configuring virtual disk devices. For this reason we will not run through a full example of how one can create network interfaces using the API object-model; instead we will use this section just to outline briefly the symmetry between virtual networking device and virtual storage device configuration.
The networking analogue of the VBD class is the VIF class. Just as a VBD is the API representation of a block device inside a VM, a VIF (Virtual network InterFace) is the API representation of a network device inside a VM. Whereas VBDs associate VM objects with VDI objects, VIFs associate VM objects with Network objects. Just like VBDs, VIFs have a currently_attached
field that determines whether or not the network device (inside the guest) associated with the VIF is currently active or not. And as we saw with VBDs, at VM boot-time the VIFs of the VM are queried and a corresponding network device for each created inside the booting VM. Similarly, VIFs also have plug
and unplug
methods for hot plugging/unplugging network devices in/out of running VMs.
Host configuration for networking and storage
We have seen that the VBD and VIF classes are used to manage configuration of block devices and network devices (respectively) inside VMs. To manage host configuration of storage and networking there are two analogous classes: PBD (Physical Block Device) and PIF (Physical [network] InterFace).
Host storage configuration: PBDs
Let us start by considering the PBD class. A PBD_create()
call takes a number of parameters including:
Parameter | Description |
---|---|
host | physical machine on which the PBD is available |
SR | the Storage Repository that the PBD connects to |
device_config | a string-to-string map that is provided to the host’s SR-backend-driver, containing the low-level parameters required to configure the physical storage device(s) on which the SR is to be realized. The specific contents of the device_config field depend on the type of the SR to which the PBD is connected. (Executing xe sm-list will show a list of possible SR types; the configuration field in this enumeration specifies the device_config parameters that each SR type expects.) |
For example, imagine we have an SR object s of type “nfs” (representing a directory on an NFS filer within which VDIs are stored as VHD files); and let’s say that we want a host, h, to be able to access s. In this case we invoke PBD.create()
specifying host h, SR s, and a value for the device_config parameter that is the following map:
("server", "my_nfs_server.example.com"), ("serverpath", "/scratch/mysrs/sr1")
This tells the XenServer Host that SR s is accessible on host h, and further that to access SR s, the host needs to mount the directory /scratch/mysrs/sr1
on the NFS server named my_nfs_server.example.com
.
Like VBD objects, PBD objects also have a field called currently_attached
. Storage repositories can be attached and detached from a given host by invoking PBD.plug
and PBD.unplug
methods respectively.
Host networking configuration: PIFs
Host network configuration is specified by virtue of PIF objects. If a PIF object connects a network object, n, to a host object h, then the network corresponding to n is bridged onto a physical interface (or a physical interface plus a VLAN tag) specified by the fields of the PIF object.
For example, imagine a PIF object exists connecting host h to a network n, and that device
field of the PIF object is set to eth0
. This means that all packets on network n are bridged to the NIC in the host corresponding to host network device eth0
.
XML-RPC notes
Datetimes
The API deviates from the XML-RPC specification in handling of datetimes. The API appends a “Z” to the end of datetime strings, which is meant to indicate that the time is expressed in UTC.
API evolution
All APIs evolve as bugs are fixed, new features added and features are removed
- the XenAPI is no exception. This document lists policies describing how the XenAPI evolves over time.
The goals of XenAPI evolution are:
- to allow bugs to be fixed efficiently;
- to allow new, innovative features to be added easily;
- to keep old, unmodified clients working as much as possible; and
- where backwards-incompatible changes are to be made, publish this information early to enable affected parties to give timely feedback.
Background
In this document, the term XenAPI refers to the XMLRPC-derived wire protocol used by xapi. The XenAPI has objects which each have fields and messages. The XenAPI is described in detail elsewhere.
XenAPI Lifecycle
graph LR Prototype -->|1| Published -->|4| Deprecated -->|5| Removed Published -->|2,3| Published
Each element of the XenAPI (objects, messages and fields) follows the lifecycle diagram above. When an element is newly created and being still in development, it is in the Prototype state. Elements in this state may be stubs: the interface is there and can be used by clients for prototyping their new features, but the actual implementation is not yet ready.
When the element subsequently becomes ready for use (the stub is replaced by a real implementation), it transitions to the Published state. This is the only state in which the object, message or field should be used. From this point onwards, the element needs to have clearly defined semantics that are available for reference in the XenAPI documentation.
If the XenAPI element becomes Deprecated, it will still function as it did before, but its use is discouraged. The final stage of the lifecycle is the Removed state, in which the element is not available anymore.
The numbered state changes in the diagram have the following meaning:
- Publish: declare that the XenAPI element is ready for people to use.
- Extend: a backwards-compatible extension of the XenAPI, for example an additional parameter in a message with an appropriate default value. If the API is used as before, it still has the same effect.
- Change: a backwards-incompatible change. That is, the message now behaves differently, or the field has different semantics. Such changes are discouraged and should only be considered in special cases (always consider whether deprecation is a better solution). The use of a message can for example be restricted for security or efficiency reasons, or the behaviour can be changed simply to fix a bug.
- Deprecate: declare that the use of this XenAPI element should be avoided from now on. Reasons for doing this include: the element is redundant (it duplicates functionality elsewhere), it is inconsistent with other parts of the XenAPI, it is insecure or inefficient. For examples of deprecation policies of other projects, see the policies of the eclipse and oval projects.
- Remove: the element is taken out of the public API and can no longer be used.
Each lifecycle transition must be accompanied by an explanation describing the change and the reason for the change. This message should be enough to understand the semantics of the XenAPI element after the change, and in the case of backwards-incompatible changes or deprecation, it should give directions about how to modify a client to deal with the change (for example, how to avoid using the deprecated field or message).
Releases
Every release must be accompanied by release notes listing all objects, fields and messages that are newly prototyped, published, extended, changed, deprecated or removed in the release. Each item should have an explanation as implied above, documenting the new or changed XenAPI element. The release notes for every release shall be prominently displayed in the XenAPI HTML documentation.
Documentation
The XenAPI documentation will contain its complete lifecycle history for each XenAPI element. Only the elements described in the documentation are “official” and supported.
Each object, message and field in datamodel.ml
will have lifecycle
metadata attached to it, which is a list of transitions (transition type *
release * explanation string) as described above. Release notes are automatically generated from this data.
Using the API
This chapter describes how to use the XenServer Management API from real programs to manage XenServer Hosts and VMs. The chapter begins with a walk-through of a typical client application and demonstrates how the API can be used to perform common tasks. Example code fragments are given in python syntax but equivalent code in the other programming languages would look very similar. The language bindings themselves are discussed afterwards and the chapter finishes with walk-throughs of two complete examples.
Anatomy of a typical application
This section describes the structure of a typical application using the XenServer Management API. Most client applications begin by connecting to a XenServer Host and authenticating (e.g. with a username and password). Assuming the authentication succeeds, the server will create a “session” object and return a reference to the client. This reference will be passed as an argument to all future API calls. Once authenticated, the client may search for references to other useful objects (e.g. XenServer Hosts, VMs, etc.) and invoke operations on them. Operations may be invoked either synchronously or asynchronously; special task objects represent the state and progress of asynchronous operations. These application elements are all described in detail in the following sections.
Choosing a low-level transport
API calls can be issued over two transports:
SSL-encrypted TCP on port 443 (https) over an IP network
plaintext over a local Unix domain socket:
/var/xapi/xapi
The SSL-encrypted TCP transport is used for all off-host traffic while the Unix domain socket can be used from services running directly on the XenServer Host itself. In the SSL-encrypted TCP transport, all API calls should be directed at the Resource Pool master; failure to do so will result in the error HOST_IS_SLAVE
, which includes the IP address of the master as an error parameter.
Because the master host of a pool can change, especially if HA is enabled on a pool, clients must implement the following steps to detect a master host change and connect to the new master as required:
Subscribe to updates in the list of hosts servers, and maintain a current list of hosts in the pool
If the connection to the pool master fails to respond, attempt to connect to all hosts in the list until one responds
The first host to respond will return the HOST_IS_SLAVE
error message, which contains the identity of the new pool master (unless of course the host is the new master)
Connect to the new master
Note
As a special-case, all messages sent through the Unix domain socket are transparently forwarded to the correct node.
Authentication and session handling
The vast majority of API calls take a session reference as their first parameter; failure to supply a valid reference will result in a SESSION_INVALID
error being returned. Acquire a session reference by supplying a username and password to the login_with_password
function.
Note
As a special-case, if this call is executed over the local Unix domain socket then the username and password are ignored and the call always succeeds.
Every session has an associated “last active” timestamp which is updated on every API call. The server software currently has a built-in limit of 500 active sessions and will remove those with the oldest “last active” field if this limit is exceeded for a given username
or originator
. In addition all sessions whose “last active” field is older than 24 hours are also removed. Therefore it is important to:
Specify an appropriate
originator
when logging in; andRemember to log out of active sessions to avoid leaking them; and
Be prepared to log in again to the server if a
SESSION_INVALID
error is caught.
In the following Python fragment a connection is established over the Unix domain socket and a session is created:
import XenAPI
session = XenAPI.xapi_local()
try:
session.xenapi.login_with_password("root", "", "2.3", "My Widget v0.1")
...
finally:
session.xenapi.session.logout()
Finding references to useful objects
Once an application has authenticated the next step is to acquire references to objects in order to query their state or invoke operations on them. All objects have a set of “implicit” messages which include the following:
get_by_name_label
: return a list of all objects of a particular class with a particular label;get_by_uuid
: return a single object named by its UUID;get_all
: return a set of references to all objects of a particular class; andget_all_records
: return a map of reference to records for each object of a particular class.
For example, to list all hosts:
hosts = session.xenapi.host.get_all()
To find all VMs with the name “my first VM”:
vms = session.xenapi.VM.get_by_name_label('my first VM')
Note
Object
name_label
fields are not guaranteed to be unique and so theget_by_name_label
API call returns a set of references rather than a single reference.
In addition to the methods of finding objects described above, most objects also contain references to other objects within fields. For example it is possible to find the set of VMs running on a particular host by calling:
vms = session.xenapi.host.get_resident_VMs(host)
Invoking synchronous operations on objects
Once object references have been acquired, operations may be invoked on them. For example to start a VM:
session.xenapi.VM.start(vm, False, False)
All API calls are by default synchronous and will not return until the operation has completed or failed. For example in the case of VM.start
the call does not return until the VM has started booting.
Note
When the
VM.start
call returns the VM will be booting. To determine when the booting has finished, wait for the in-guest agent to report internal statistics through theVM_guest_metrics
object.
Using Tasks to manage asynchronous operations
To simplify managing operations which take quite a long time (e.g. VM.clone
and VM.copy
) functions are available in two forms: synchronous (the default) and asynchronous. Each asynchronous function returns a reference to a task object which contains information about the in-progress operation including:
whether it is pending
whether it is has succeeded or failed
progress (in the range 0-1)
the result or error code returned by the operation
An application which wanted to track the progress of a VM.clone
operation and display a progress bar would have code like the following:
vm = session.xenapi.VM.get_by_name_label('my vm')
task = session.xenapi.Async.VM.clone(vm)
while session.xenapi.task.get_status(task) == "pending":
progress = session.xenapi.task.get_progress(task)
update_progress_bar(progress)
time.sleep(1)
session.xenapi.task.destroy(task)
Note
Note that a well-behaved client should remember to delete tasks created by asynchronous operations when it has finished reading the result or error. If the number of tasks exceeds a built-in threshold then the server will delete the oldest of the completed tasks.
Subscribing to and listening for events
With the exception of the task and metrics classes, whenever an object is modified the server generates an event. Clients can subscribe to this event stream on a per-class basis and receive updates rather than resorting to frequent polling. Events come in three types:
add
- generated when an object has been created;del
- generated immediately before an object is destroyed; andmod
- generated when an object’s field has changed.
Events also contain a monotonically increasing ID, the name of the class of object and a snapshot of the object state equivalent to the result of a get_record()
.
Clients register for events by calling event.register()
with a list of class names or the special string “*”. Clients receive events by executing event.next()
which blocks until events are available and returns the new events.
Note
Since the queue of generated events on the server is of finite length a very slow client might fail to read the events fast enough; if this happens an
EVENTS_LOST
error is returned. Clients should be prepared to handle this by re-registering for events and checking that the condition they are waiting for hasn’t become true while they were unregistered.
The following python code fragment demonstrates how to print a summary of every event generated by a system: (similar code exists in Xenserver-SDK/XenServerPython/samples/watch-all-events.py
)
fmt = "%8s %20s %5s %s"
session.xenapi.event.register(["*"])
while True:
try:
for event in session.xenapi.event.next():
name = "(unknown)"
if "snapshot" in event.keys():
snapshot = event["snapshot"]
if "name_label" in snapshot.keys():
name = snapshot["name_label"]
print fmt % (event['id'], event['class'], event['operation'], name)
except XenAPI.Failure, e:
if e.details == [ "EVENTS_LOST" ]:
print "Caught EVENTS_LOST; should reregister"
Language bindings
C
The SDK includes the source to the C language binding in the directory XenServer-SDK/libxenserver/src
together with a Makefile which compiles the binding into a library. Every API object is associated with a header file which contains declarations for all that object’s API functions; for example the type definitions and functions required to invoke VM operations are all contained in xen_vm.h
.
C binding dependencies
Platform supported: | Linux |
Library: | The language binding is generated as a |
Dependencies: |
|
The following simple examples are included with the C bindings:
test_vm_async_migrate
: demonstrates how to use asynchronous API calls to migrate running VMs from a slave host to the pool master.test_vm_ops
: demonstrates how to query the capabilities of a host, create a VM, attach a fresh blank disk image to the VM and then perform various powercycle operations;test_failures
: demonstrates how to translate error strings into enum_xen_api_failure, and vice versa;test_event_handling
: demonstrates how to listen for events on a connection.test_enumerate
: demonstrates how to enumerate the various API objects.
C#
The C# bindings are contained within the directory XenServer-SDK/XenServer.NET
and include project files suitable for building under Microsoft Visual Studio. Every API object is associated with one C# file; for example the functions implementing the VM operations are contained within the file VM.cs
.
C# binding dependencies
Platform supported: | Windows with .NET version 4.5 |
Library: | The language binding is generated as a Dynamic Link Library XenServer.dll that is linked by C# programs. |
Dependencies: | CookComputing.XMLRpcV2.dll is needed for the XenServer.dll to be able to communicate with the xml-rpc server. We test with version 2.1.0.6 and recommend that you use this version, though others may work. |
Three examples are included with the C# bindings in the directory XenServer-SDK/XenServer.NET/samples
as separate projects of the XenSdkSample.sln
solution:
GetVariousRecords
: logs into a XenServer Host and displays information about hosts, storage and virtual machines;GetVmRecords
: logs into a XenServer Host and lists all the VM records;VmPowerStates
: logs into a XenServer Host, finds a VM and takes it through the various power states. Requires a shut-down VM to be already installed.
Java
The Java bindings are contained within the directory XenServer-SDK/XenServerJava
and include project files suitable for building under Microsoft Visual Studio. Every API object is associated with one Java file; for example the functions implementing the VM operations are contained within the file VM.java
.
Java binding dependencies
Platform supported: | Linux and Windows |
Library: | The language binding is generated as a Java Archive file |
Dependencies: |
|
Running the main file XenServer-SDK/XenServerJava/samples/RunTests.java
will run a series of examples included in the same directory:
AddNetwork
: Adds a new internal network not attached to any NICs;SessionReuse
: Demonstrates how a Session object can be shared between multiple Connections;AsyncVMCreate
: Makes asynchronously a new VM from a built-in template, starts and stops it;VdiAndSrOps
: Performs various SR and VDI tests, including creating a dummy SR;CreateVM
: Creates a VM on the default SR with a network and DVD drive;DeprecatedMethod
: Tests a warning is displayed wehn a deprecated API method is called;GetAllRecordsOfAllTypes
: Retrieves all the records for all types of objects;SharedStorage
: Creates a shared NFS SR;StartAllVMs
: Connects to a host and tries to start each VM on it.
PowerShell
The PowerShell bindings are contained within the directory XenServer-SDK/XenServerPowerShell
. We provide the PowerShell module XenServerPSModule
and source code exposing the XenServer API as Windows PowerShell cmdlets.
PowerShell binding dependencies
Platform supported: | Windows with .NET Framework 4.5 and PowerShell v4.0 |
Library: | XenServerPSModule |
Dependencies: | CookComputing.XMLRpcV2.dll is needed to be able to communicate with the xml-rpc server. We test with version 2.1.0.6 and recommend that you use this version, though others may work. |
These example scripts are included with the PowerShell bindings in the directory XenServer-SDK/XenServerPowerShell/samples
:
AutomatedTestCore.ps1
: demonstrates how to log into a XenServer host, create a storage repository and a VM, and then perform various powercycle operations;HttpTest.ps1
: demonstrates how to log into a XenServer host, create a VM, and then perform operations such as VM importing and exporting, patch upload, and retrieval of performance statistics.
Python
The python bindings are contained within a single file: XenServer-SDK/XenServerPython/XenAPI.py
.
Python binding dependencies
|:–|:–| |Platform supported:|Linux| |Library:|XenAPI.py| |Dependencies:|None|
The SDK includes 7 python examples:
fixpbds.py
- reconfigures the settings used to access shared storage;install.py
- installs a Debian VM, connects it to a network, starts it up and waits for it to report its IP address;license.py
- uploads a fresh license to a XenServer Host;permute.py
- selects a set of VMs and uses XenMotion to move them simultaneously between hosts;powercycle.py
- selects a set of VMs and powercycles them;shell.py
- a simple interactive shell for testing;vm_start_async.py
- demonstrates how to invoke operations asynchronously;watch-all-events.py
- registers for all events and prints details when they occur.
Command Line Interface (CLI)
Besides using raw XML-RPC or one of the supplied language bindings, third-party software developers may integrate with XenServer Hosts by using the XE command line interface xe
. The xe CLI is installed by default on XenServer hosts; a stand-alone remote CLI is also available for Linux. On Windows, the xe.exe
CLI executable is installed along with XenCenter.
CLI dependencies
|:–|:–| |Platform supported:|Linux and Windows| |Library:|None| |Binary:|xe (xe.exe on Windows)| |Dependencies:|None|
The CLI allows almost every API call to be directly invoked from a script or other program, silently taking care of the required session management. The XE CLI syntax and capabilities are described in detail in the XenServer Administrator’s Guide. For additional resources and examples, visit the Citrix Knowledge Center.
Note
When running the CLI from a XenServer Host console, tab-completion of both command names and arguments is available.
Complete application examples
This section describes two complete examples of real programs using the API.
Simultaneously migrating VMs using XenMotion
This python example (contained in XenServer-SDK/XenServerPython/samples/permute.py
) demonstrates how to use XenMotion to move VMs simultaneously between hosts in a Resource Pool. The example makes use of asynchronous API calls and shows how to wait for a set of tasks to complete.
The program begins with some standard boilerplate and imports the API bindings module
import sys, time
import XenAPI
Next the commandline arguments containing a server URL, username, password and a number of iterations are parsed. The username and password are used to establish a session which is passed to the function main
, which is called multiple times in a loop. Note the use of try: finally:
to make sure the program logs out of its session at the end.
if __name__ == "__main__":
if len(sys.argv) <> 5:
print "Usage:"
print sys.argv[0], " <url> <username> <password> <iterations>"
sys.exit(1)
url = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]
iterations = int(sys.argv[4])
# First acquire a valid session by logging in:
session = XenAPI.Session(url)
session.xenapi.login_with_password(username, password, "2.3",
"Example migration-demo v0.1")
try:
for i in range(iterations):
main(session, i)
finally:
session.xenapi.session.logout()
The main
function examines each running VM in the system, taking care to filter out control domains (which are part of the system and not controllable by the user). A list of running VMs and their current hosts is constructed.
def main(session, iteration):
# Find a non-template VM object
all = session.xenapi.VM.get_all()
vms = []
hosts = []
for vm in all:
record = session.xenapi.VM.get_record(vm)
if not(record["is_a_template"]) and \
not(record["is_control_domain"]) and \
record["power_state"] == "Running":
vms.append(vm)
hosts.append(record["resident_on"])
print "%d: Found %d suitable running VMs" % (iteration, len(vms))
Next the list of hosts is rotated:
# use a rotation as a permutation
hosts = [hosts[-1]] + hosts[:(len(hosts)-1)]
Each VM is then moved using XenMotion to the new host under this rotation (i.e. a VM running on host at position 2 in the list will be moved to the host at position 1 in the list etc.) In order to execute each of the movements in parallel, the asynchronous version of the VM.pool_migrate
is used and a list of task references constructed. Note the live
flag passed to the VM.pool_migrate
; this causes the VMs to be moved while they are still running.
tasks = []
for i in range(0, len(vms)):
vm = vms[i]
host = hosts[i]
task = session.xenapi.Async.VM.pool_migrate(vm, host, { "live": "true" })
tasks.append(task)
The list of tasks is then polled for completion:
finished = False
records = {}
while not(finished):
finished = True
for task in tasks:
record = session.xenapi.task.get_record(task)
records[task] = record
if record["status"] == "pending":
finished = False
time.sleep(1)
Once all tasks have left the pending state (i.e. they have successfully completed, failed or been cancelled) the tasks are polled once more to see if they all succeeded:
allok = True
for task in tasks:
record = records[task]
if record["status"] <> "success":
allok = False
If any one of the tasks failed then details are printed, an exception is raised and the task objects left around for further inspection. If all tasks succeeded then the task objects are destroyed and the function returns.
if not(allok):
print "One of the tasks didn't succeed at", \
time.strftime("%F:%HT%M:%SZ", time.gmtime())
idx = 0
for task in tasks:
record = records[task]
vm_name = session.xenapi.VM.get_name_label(vms[idx])
host_name = session.xenapi.host.get_name_label(hosts[idx])
print "%s : %12s %s -> %s [ status: %s; result = %s; error = %s ]" % \
(record["uuid"], record["name_label"], vm_name, host_name, \
record["status"], record["result"], repr(record["error_info"]))
idx = idx + 1
raise "Task failed"
else:
for task in tasks:
session.xenapi.task.destroy(task)
Cloning a VM using the XE CLI
This example is a bash
script which uses the XE CLI to clone a VM taking care to shut it down first if it is powered on.
The example begins with some boilerplate which first checks if the environment variable XE
has been set: if it has it assumes that it points to the full path of the CLI, else it is assumed that the XE CLI is on the current path. Next the script prompts the user for a server name, username and password:
# Allow the path to the 'xe' binary to be overridden by the XE environment variable
if [ -z "${XE}" ]; then
XE=xe
fi
if [ ! -e "${HOME}/.xe" ]; then
read -p "Server name: " SERVER
read -p "Username: " USERNAME
read -p "Password: " PASSWORD
XE="${XE} -s ${SERVER} -u ${USERNAME} -pw ${PASSWORD}"
fi
Next the script checks its commandline arguments. It requires exactly one: the UUID of the VM which is to be cloned:
# Check if there's a VM by the uuid specified
${XE} vm-list params=uuid | grep -q " ${vmuuid}$"
if [ $? -ne 0 ]; then
echo "error: no vm uuid \"${vmuuid}\" found"
exit 2
fi
The script then checks the power state of the VM and if it is running, it attempts a clean shutdown. The event system is used to wait for the VM to enter state “Halted”.
Note
The XE CLI supports a command-line argument
--minimal
which causes it to print its output without excess whitespace or formatting, ideal for use from scripts. If multiple values are returned they are comma-separated.
# Check the power state of the vm
name=$(${XE} vm-list uuid=${vmuuid} params=name-label --minimal)
state=$(${XE} vm-list uuid=${vmuuid} params=power-state --minimal)
wasrunning=0
# If the VM state is running, we shutdown the vm first
if [ "${state}" = "running" ]; then
${XE} vm-shutdown uuid=${vmuuid}
${XE} event-wait class=vm power-state=halted uuid=${vmuuid}
wasrunning=1
fi
The VM is then cloned and the new VM has its name_label
set to cloned_vm
.
# Clone the VM
newuuid=$(${XE} vm-clone uuid=${vmuuid} new-name-label=cloned_vm)
Finally, if the original VM had been running and was shutdown, both it and the new VM are started.
# If the VM state was running before cloning, we start it again
# along with the new VM.
if [ "$wasrunning" -eq 1 ]; then
${XE} vm-start uuid=${vmuuid}
${XE} vm-start uuid=${newuuid}
fi
XenAPI Reference
XenAPI Classes
Click on a class to view the associated fields and messages.

Classes, Fields and Messages
Classes have both fields and messages. Messages are either implicit or explicit where an implicit message is one of:
- a constructor (usually called "create");
- a destructor (usually called "destroy");
- "get_by_name_label";
- "get_by_uuid";
- "get_record";
- "get_all"; and
- "get_all_records".
Explicit messages include all the rest, more class-specific messages (e.g. "VM.start", "VM.clone")
Every field has at least one accessor depending both on its type and whether it is read-only or read-write. Accessors for a field named "X" would be a proper subset of:
- set_X: change the value of field X (only if it is read-write);
- get_X: retrieve the value of field X;
- add_X: add a key/value pair (for fields of type set);
- remove_X: remove a key (for fields of type set);
- add_to_X: add a key/value pair (for fields of type map); and
- remove_from_X: remove a key (for fields of type map).
Subsections of XenAPI Reference
auth
Class: auth
Fields
Messages
blob
Class: blob
Fields
Messages
Bond
Class: Bond
Enums
Fields
Messages
Certificate
Class: Certificate
Enums
Fields
Messages
Cluster
Class: Cluster
Enums
Fields
Messages
Cluster_host
Class: Cluster_host
Enums
Fields
Messages
console
Class: console
Enums
Fields
Messages
crashdump
Class: crashdump
Fields
Messages
data_source
Class: data_source
Fields
Messages
DR_task
Class: DR_task
Fields
Messages
event
Class: event
Enums
Fields
Messages
Feature
Class: Feature
Fields
Messages
GPU_group
Class: GPU_group
Enums
Fields
Messages
host
Class: host
Enums
Fields
Messages
host_cpu
Class: host_cpu
Fields
Messages
host_crashdump
Class: host_crashdump
Fields
Messages
host_metrics
Class: host_metrics
Fields
Messages
host_patch
Class: host_patch
Fields
Messages
LVHD
Class: LVHD
Fields
Messages
message
Class: message
Enums
Fields
Messages
network
Class: network
Enums
Fields
Messages
network_sriov
Class: network_sriov
Enums
Fields
Messages
Observer
Class: Observer
Fields
Messages
PBD
Class: PBD
Fields
Messages
PCI
Class: PCI
Fields
Messages
PGPU
Class: PGPU
Enums
Fields
Messages
PIF
Class: PIF
Enums
Fields
Messages
PIF_metrics
Class: PIF_metrics
Fields
Messages
pool
Class: pool
Enums
Fields
Messages
pool_patch
Class: pool_patch
Enums
Fields
Messages
pool_update
Class: pool_update
Enums
Fields
Messages
probe_result
Class: probe_result
Fields
Messages
PUSB
Class: PUSB
Fields
Messages
PVS_cache_storage
Class: PVS_cache_storage
Fields
Messages
PVS_proxy
Class: PVS_proxy
Enums
Fields
Messages
PVS_server
Class: PVS_server
Fields
Messages
PVS_site
Class: PVS_site
Fields
Messages
Repository
Class: Repository
Fields
Messages
role
Class: role
Fields
Messages
SDN_controller
Class: SDN_controller
Enums
Fields
Messages
secret
Class: secret
Fields
Messages
session
Class: session
Fields
Messages
SM
Class: SM
Fields
Messages
SR
Class: SR
Enums
Fields
Messages
sr_stat
Class: sr_stat
Enums
Fields
Messages
subject
Class: subject
Fields
Messages
task
Class: task
Enums
Fields
Messages
tunnel
Class: tunnel
Enums
Fields
Messages
USB_group
Class: USB_group
Fields
Messages
user
Class: user
Fields
Messages
VBD
Class: VBD
Enums
Fields
Messages
VBD_metrics
Class: VBD_metrics
Fields
Messages
VDI
Class: VDI
Enums
Fields
Messages
vdi_nbd_server_info
Class: vdi_nbd_server_info
Fields
Messages
VGPU
Class: VGPU
Fields
Messages
VGPU_type
Class: VGPU_type
Enums
Fields
Messages
VIF
Class: VIF
Enums
Fields
Messages
VIF_metrics
Class: VIF_metrics
Fields
Messages
VLAN
Class: VLAN
Fields
Messages
VM
Class: VM
Enums
Fields
Messages
VM_appliance
Class: VM_appliance
Enums
Fields
Messages
VM_guest_metrics
Class: VM_guest_metrics
Enums
Fields
Messages
VM_metrics
Class: VM_metrics
Enums
Fields
Messages
VMPP
Class: VMPP
Enums
Fields
Messages
VMSS
Class: VMSS
Enums
Fields
Messages
VTPM
Class: VTPM
Enums
Fields
Messages
VUSB
Class: VUSB
Enums
Fields
Messages
XenAPI Releases
- XAPI 24.16.0
- XAPI 24.14.0
- XAPI 24.10.0
- XAPI 24.3.0
- XAPI 24.0.0
- XAPI 23.30.0
- XAPI 23.27.0
- XAPI 23.25.0
- XAPI 23.18.0
- XAPI 23.14.0
- XAPI 23.9.0
- XAPI 23.1.0
- XAPI 22.37.0
- XAPI 22.33.0
- XAPI 22.27.0
- XAPI 22.26.0
- XAPI 22.20.0
- XAPI 22.19.0
- XAPI 22.16.0
- XAPI 22.12.0
- XAPI 22.5.0
- XAPI 21.4.0
- XAPI 21.3.0
- XAPI 21.2.0
- XAPI 1.329.0
- XAPI 1.318.0
- XAPI 1.313.0
- XAPI 1.307.0
- XAPI 1.304.0
- XAPI 1.303.0
- XAPI 1.301.0
- XAPI 1.298.0
- XAPI 1.297.0
- XAPI 1.294.0
- XAPI 1.290.0
- XAPI 1.271.0
- XAPI 1.257.0
- XAPI 1.250.0
- XenServer 8 Preview
- Citrix Hypervisor 8.2 Hotfix 2
- Citrix Hypervisor 8.2
- Citrix Hypervisor 8.1
- Citrix Hypervisor 8.0
- XenServer 7.6
- XenServer 7.5
- XenServer 7.4
- XenServer 7.3
- XenServer 7.2
- XenServer 7.1
- XenServer 7.0
- XenServer 6.5 SP1 Hotfix 31
- XenServer 6.5 SP1
- XenServer 6.5
- XenServer 6.2 SP1 Hotfix 11
- XenServer 6.2 SP1 Hotfix 4
- XenServer 6.2 SP1
- XenServer 6.2 SP1 Tech-Preview
- XenServer 6.2
- XenServer 6.1
- XenServer 6.0
- XenServer 5.6 FP1
- XenServer 5.6
- XenServer 5.5
- XenServer 5.0 Update 1
- XenServer 5.0
- XenServer 4.1.1
- XenServer 4.1
- XenServer 4.0
Subsections of XenAPI Releases
XAPI 24.16.0
XAPI 24.16.0
Code name: "24.16.0".Changes
Change | Element | Description |
---|---|---|
Extended class | sr_stat | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.clustered | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.free_space | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.health | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.name_description | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.name_label | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.total_space | Enum extended with 'unreachable' and 'unavailable' values |
Extended field | sr_stat.uuid | Enum extended with 'unreachable' and 'unavailable' values |
XAPI 24.14.0
XAPI 24.14.0
Code name: "24.14.0".Changes
Change | Element | Description |
---|---|---|
Prototyped message | PCI.disable_dom0_access | |
Prototyped message | PCI.enable_dom0_access | |
Prototyped message | PCI.get_dom0_access_status | |
Changed field | VM.has_vendor_device | New default and not consulting Pool.policy_no_vendor_device |
Deprecated field | PGPU.dom0_access | Use PCI.get_dom0_access_status instead. |
Deprecated field | pool.policy_no_vendor_device | No longer considered by VM.create |
Deprecated message | PGPU.disable_dom0_access | Use PCI.disable_dom0_access instead. |
Deprecated message | PGPU.enable_dom0_access | Use PCI.enable_dom0_access instead. |
XAPI 24.10.0
XAPI 24.10.0
Code name: "24.10.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | VM.pending_guidances_full | |
Prototyped field | VM.pending_guidances_recommended | |
Prototyped field | host.last_update_hash | |
Prototyped field | host.pending_guidances_full | |
Prototyped field | host.pending_guidances_recommended | |
Prototyped message | host.emergency_clear_mandatory_guidance |
XAPI 24.3.0
XAPI 24.3.0
Code name: "24.3.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | Cluster.is_quorate | |
Prototyped field | Cluster.live_hosts | |
Prototyped field | Cluster.quorum | |
Prototyped field | Cluster_host.last_update_live | |
Prototyped field | Cluster_host.live |
XAPI 24.0.0
XAPI 24.0.0
Code name: "24.0.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | host.numa_affinity_policy | |
Prototyped field | pool.custom_uefi_certificates | |
Prototyped message | host.set_numa_affinity_policy | |
Prototyped message | pool.set_custom_uefi_certificates | |
Deprecated message | pool.set_uefi_certificates | use set_custom_uefi_certificates instead |
XAPI 23.30.0
XAPI 23.30.0
Code name: "23.30.0".Changes
Change | Element | Description |
---|---|---|
Prototyped message | VM.restart_device_models |
XAPI 23.27.0
XAPI 23.27.0
Code name: "23.27.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | pool.ext_auth_max_threads | |
Prototyped field | pool.local_auth_max_threads | |
Prototyped message | pool.set_ext_auth_max_threads | |
Prototyped message | pool.set_local_auth_max_threads | |
Extended message | host.evacuate | Choose batch size of VM evacuation. |
XAPI 23.25.0
XAPI 23.25.0
Code name: "23.25.0".Changes
Change | Element | Description |
---|---|---|
Removed message | host.apply_recommended_guidances |
XAPI 23.18.0
XAPI 23.18.0
Code name: "23.18.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | host.latest_synced_updates_applied | |
Prototyped field | pool.last_update_sync | |
Prototyped field | pool.update_sync_day | |
Prototyped field | pool.update_sync_enabled | |
Prototyped field | pool.update_sync_frequency | |
Prototyped message | host.apply_recommended_guidances | |
Prototyped message | pool.configure_update_sync | |
Prototyped message | pool.set_update_sync_enabled | |
Removed field | Repository.up_to_date | The up_to_date field of repository was removed |
XAPI 23.14.0
XAPI 23.14.0
Code name: "23.14.0".Changes
Change | Element | Description |
---|---|---|
Prototyped class | Observer | |
Prototyped field | Observer.attributes | |
Prototyped field | Observer.components | |
Prototyped field | Observer.enabled | |
Prototyped field | Observer.endpoints | |
Prototyped field | Observer.hosts | |
Prototyped field | Observer.uuid | |
Prototyped message | Observer.set_attributes | |
Prototyped message | Observer.set_components | |
Prototyped message | Observer.set_enabled | |
Prototyped message | Observer.set_endpoints | |
Prototyped message | Observer.set_hosts |
XAPI 23.9.0
XAPI 23.9.0
Code name: "23.9.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | pool.telemetry_frequency | |
Prototyped field | pool.telemetry_next_collection | |
Prototyped field | pool.telemetry_uuid | |
Prototyped message | pool.reset_telemetry_uuid | |
Prototyped message | pool.set_telemetry_next_collection | |
Changed field | pool.repository_proxy_password | Changed internal_only to false |
XAPI 23.1.0
XAPI 23.1.0
Code name: "23.1.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | VM.actions_after_softreboot |
XAPI 22.37.0
XAPI 22.37.0
Code name: "22.37.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | pool.coordinator_bias |
XAPI 22.33.0
XAPI 22.33.0
Code name: "22.33.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | pool.migration_compression |
XAPI 22.27.0
XAPI 22.27.0
Code name: "22.27.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | host.https_only | |
Prototyped message | host.set_https_only | |
Prototyped message | pool.set_https_only |
XAPI 22.26.0
XAPI 22.26.0
Code name: "22.26.0".Changes
Change | Element | Description |
---|---|---|
Prototyped class | VTPM | |
Prototyped field | VTPM.is_protected | |
Prototyped field | VTPM.is_unique | |
Prototyped field | VTPM.persistence_backend | |
Prototyped message | VTPM.create | |
Prototyped message | VTPM.destroy |
XAPI 22.20.0
XAPI 22.20.0
Code name: "22.20.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | host.last_software_update |
XAPI 22.19.0
XAPI 22.19.0
Code name: "22.19.0".Changes
Change | Element | Description |
---|---|---|
Prototyped message | message.destroy_many |
XAPI 22.16.0
XAPI 22.16.0
Code name: "22.16.0".Changes
Change | Element | Description |
---|---|---|
Published message | pool.set_uefi_certificates | Set the UEFI certificates for a pool and all its hosts. Deprecated: use set_custom_uefi_certificates instead |
Changed field | pool.uefi_certificates | Became StaticRO to be editable through new method |
Deprecated field | host.uefi_certificates | Use Pool.uefi_certificates instead |
Deprecated message | host.set_uefi_certificates | Use Pool.set_uefi_certificates instead |
XAPI 22.12.0
XAPI 22.12.0
Code name: "22.12.0".Changes
Change | Element | Description |
---|---|---|
Prototyped field | Repository.gpgkey_path | |
Prototyped message | Repository.set_gpgkey_path |
XAPI 22.5.0
XAPI 22.5.0
Code name: "22.5.0".Changes
Change | Element | Description |
---|---|---|
Published field | role.is_internal | Indicates whether the role is only to be assigned internally by xapi, or can be used by clients |
XAPI 21.4.0
XAPI 21.4.0
Code name: "21.4.0".Changes
Change | Element | Description |
---|---|---|
Published message | pool.disable_repository_proxy | Disable the proxy for RPM package repositories. |
XAPI 21.3.0
XAPI 21.3.0
Code name: "21.3.0".Changes
Change | Element | Description |
---|---|---|
Published field | pool.repository_proxy_password | Password for the authentication of the proxy used in syncing with the enabled repositories |
Published field | pool.repository_proxy_url | Url of the proxy used in syncing with the enabled repositories |
Published field | pool.repository_proxy_username | Username for the authentication of the proxy used in syncing with the enabled repositories |
Published message | pool.configure_repository_proxy | Configure proxy for RPM package repositories. |
Published message | task.set_error_info | Set the task error info |
Published message | task.set_result | Set the task result |
XAPI 21.2.0
XAPI 21.2.0
Code name: "21.2.0".Changes
Change | Element | Description |
---|---|---|
Published field | session.client_certificate | indicates whether this session was authenticated using a client certificate |
XAPI 1.329.0
XAPI 1.329.0
Code name: "1.329.0".Changes
Change | Element | Description |
---|---|---|
Published message | pool.sync_updates | Sync with the enabled repository |
XAPI 1.318.0
XAPI 1.318.0
Code name: "1.318.0".Changes
Change | Element | Description |
---|---|---|
Published field | pool.client_certificate_auth_enabled | True if authentication by TLS client certificates is enabled |
Published field | pool.client_certificate_auth_name | The name (CN/SAN) that an incoming client certificate must have to allow authentication |
Published message | pool.disable_client_certificate_auth | Disable client certificate authentication on the pool |
Published message | pool.enable_client_certificate_auth | Enable client certificate authentication on the pool |
XAPI 1.313.0
XAPI 1.313.0
Code name: "1.313.0".Changes
Change | Element | Description |
---|---|---|
Published field | host.tls_verification_enabled | True if this host has TLS verifcation enabled |
Extended field | message.cls | Added Certificate class |
XAPI 1.307.0
XAPI 1.307.0
Code name: "1.307.0".Changes
Change | Element | Description |
---|---|---|
Published message | host.refresh_server_certificate | Replace the internal self-signed host certficate with a new one. |
XAPI 1.304.0
XAPI 1.304.0
Code name: "1.304.0".Changes
Change | Element | Description |
---|---|---|
Published message | pool.check_update_readiness | Check if the pool is ready to be updated. If not, report the reasons. |
XAPI 1.303.0
XAPI 1.303.0
Code name: "1.303.0".Changes
Change | Element | Description |
---|---|---|
Published field | VM.pending_guidances | The set of pending mandatory guidances after applying updates, which must be applied, as otherwise there may be e.g. VM failures |
Published field | host.pending_guidances | The set of pending mandatory guidances after applying updates, which must be applied, as otherwise there may be e.g. VM failures |
XAPI 1.301.0
XAPI 1.301.0
Code name: "1.301.0".Changes
Change | Element | Description |
---|---|---|
Published class | Repository | Repository for updates |
Published field | Repository.binary_url | Base URL of binary packages in this repository |
Published field | Repository.hash | SHA256 checksum of latest updateinfo.xml.gz in this repository if its 'update' is true |
Published field | Repository.source_url | Base URL of source packages in this repository |
Published field | Repository.up_to_date | True if all hosts in pool is up to date with this repository |
Published field | Repository.update | True if updateinfo.xml in this repository needs to be parsed |
Published field | Repository.uuid | Unique identifier/object reference |
Published field | pool.repositories | The set of currently enabled repositories |
Published message | Repository.forget | Remove the repository record from the database |
Published message | Repository.introduce | Add the configuration for a new repository |
Published message | host.apply_updates | apply updates from current enabled repository on a host |
Published message | pool.add_repository | Add a repository to the enabled set |
Published message | pool.remove_repository | Remove a repository from the enabled set |
Published message | pool.set_repositories | Set enabled set of repositories |
XAPI 1.298.0
XAPI 1.298.0
Code name: "1.298.0".Changes
Change | Element | Description |
---|---|---|
Published message | host.emergency_reenable_tls_verification | Reenable TLS verification for this host only |
XAPI 1.297.0
XAPI 1.297.0
Code name: "1.297.0".Changes
Change | Element | Description |
---|---|---|
Extended message | host.evacuate | Enable migration network selection. |
XAPI 1.294.0
XAPI 1.294.0
Code name: "1.294.0".Changes
Change | Element | Description |
---|---|---|
Published field | Certificate.name | The name of the certificate, only present on certificates of type 'ca' |
Published field | Certificate.type | The type of the certificate, either 'ca', 'host' or 'host_internal' |
XAPI 1.290.0
XAPI 1.290.0
Code name: "1.290.0".Changes
Change | Element | Description |
---|---|---|
Published field | pool.tls_verification_enabled | True iff TLS certificate verification is enabled |
Published message | host.emergency_disable_tls_verification | Disable TLS verification for this host only |
Published message | host.reset_server_certificate | Delete the current TLS server certificate and replace by a new, self-signed one. This should only be used with extreme care. |
Published message | pool.enable_tls_verification | Enable TLS server certificate verification |
Published message | pool.install_ca_certificate | Install TLS CA certificate |
Published message | pool.uninstall_ca_certificate | Uninstall TLS CA certificate |
Deprecated field | pool.wlb_verify_cert | Deprecated: to enable TLS verification use Pool.enable_tls_verification instead |
Deprecated message | pool.certificate_install | Use Pool.install_ca_certificate instead |
Deprecated message | pool.certificate_list | Use openssl to inspect certificate |
Deprecated message | pool.certificate_uninstall | Use Pool.uninstall_ca_certificate instead |
XAPI 1.271.0
XAPI 1.271.0
Code name: "1.271.0".Changes
Change | Element | Description |
---|---|---|
Published message | host.get_sched_gran | Gets xen's sched-gran on a host |
Published message | host.set_sched_gran | Sets xen's sched-gran on a host. See: https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html#sched-gran-x86 |
XAPI 1.257.0
XAPI 1.257.0
Code name: "1.257.0".Changes
Change | Element | Description |
---|---|---|
Changed class | VM | possibility to create a VM in suspended mode with a suspend_VDI set |
Changed field | VBD.currently_attached | Made StaticRO to allow plugged VIF and VBD creation for Suspended VM |
Changed field | VBD.device | Become static to allow plugged VBD creation for Suspended VM |
Changed field | VIF.currently_attached | Made StaticRO to allow plugged VIF and VBD creation for Suspended VM |
Changed field | VM.last_booted_record | Become static to allow Suspended VM creation |
Changed field | VM.power_state | Made StaticRO to allow Suspended VM creation |
Changed field | VM.suspend_VDI | Become static to allow Suspended VM creation |
XAPI 1.250.0
XAPI 1.250.0
Code name: "1.250.0".Changes
Change | Element | Description |
---|---|---|
Published field | tunnel.protocol | Add protocol field to tunnel |
XenServer 8 Preview
XenServer 8 Preview
Code name: "nile-preview".No changes...
Citrix Hypervisor 8.2 Hotfix 2
Citrix Hypervisor 8.2 Hotfix 2
Code name: "stockholm_psr".Changes
Change | Element | Description |
---|---|---|
Published field | pool.is_psr_pending | True if either a PSR is running or we are waiting for a PSR to be re-run |
Published message | pool.rotate_secret |
Citrix Hypervisor 8.2
Citrix Hypervisor 8.2
Code name: "stockholm".Changes
Change | Element | Description |
---|---|---|
Published class | Certificate | An X509 certificate used for TLS connections |
Published field | Certificate.fingerprint | The certificate's SHA256 fingerprint / hash |
Published field | Certificate.host | The host where the certificate is installed |
Published field | Certificate.not_after | Date before which the certificate is valid |
Published field | Certificate.not_before | Date after which the certificate is valid |
Published field | Certificate.uuid | Unique identifier/object reference |
Published field | PUSB.speed | USB device speed |
Published field | host.certificates | List of certificates installed in the host |
Published field | host.editions | List of all available product editions |
Published message | host.emergency_reset_server_certificate | Delete the current TLS server certificate and replace by a new, self-signed one. This should only be used with extreme care. |
Published message | host.install_server_certificate | Install the TLS server certificate. |
Published message | task.set_progress | Set the task progress |
Changed message | host.set_power_on_mode | Removed iLO script |
Changed message | host.set_ssl_legacy | Legacy SSL no longer supported |
Deprecated field | host.ssl_legacy | Legacy SSL no longer supported |
Deprecated message | pool.disable_ssl_legacy | Legacy SSL no longer supported |
Removed message | pool.enable_ssl_legacy | Legacy SSL no longer supported |
Citrix Hypervisor 8.1
Citrix Hypervisor 8.1
Code name: "quebec".Changes
Change | Element | Description |
---|---|---|
Published field | Bond.auto_update_mac | true if the MAC was taken from the primary slave when the bond was created, and false if the client specified the MAC |
Published field | VGPU.PCI | Device passed trough to VM, either as full device or SR-IOV virtual function |
Published field | VGPU.extra_args | Extra arguments for vGPU and passed to demu |
Published field | VGPU_type.compatible_types_in_vm | List of VGPU types which are compatible in one VM |
Published field | host.uefi_certificates | The UEFI certificates allowing Secure Boot |
Published field | pool.uefi_certificates | The UEFI certificates allowing Secure Boot |
Published message | host.set_uefi_certificates | Sets the UEFI certificates on a host |
Changed message | VM.assert_can_boot_here | Does additional compatibility checks when VM powerstate is not halted (e.g. CPUID). Use this before calling VM.resume or VM.pool_migrate. |
Removed message | VM.snapshot_with_quiesce | VSS support has been removed |
Citrix Hypervisor 8.0
Citrix Hypervisor 8.0
Code name: "naples".Changes
Change | Element | Description |
---|---|---|
Published field | VM.NVRAM | initial value for guest NVRAM (containing UEFI variables, etc). Cannot be changed while the VM is running |
Published message | VM.add_to_NVRAM | |
Published message | VM.remove_from_NVRAM | |
Published message | VM.set_NVRAM |
XenServer 7.6
XenServer 7.6
Code name: "lima".Changes
Change | Element | Description |
---|---|---|
Published class | Cluster | Cluster-wide Cluster metadata |
Published class | Cluster_host | Cluster member metadata |
Published class | probe_result | A set of properties that describe one result element of SR.probe. Result elements and properties can change dynamically based on changes to the the SR.probe input-parameters or the target. |
Published class | sr_stat | A set of high-level properties associated with an SR. |
Published field | Cluster.cluster_config | Contains read-only settings for the cluster, such as timeouts and other options. It can only be set at cluster create time |
Published field | Cluster.cluster_hosts | A list of the cluster_host objects associated with the Cluster |
Published field | Cluster.cluster_stack | Simply the string 'corosync'. No other cluster stacks are currently supported |
Published field | Cluster.cluster_stack_version | Version of cluster stack, not writable via the API. Defaulting to 2 for backwards compatibility when upgrading from a cluster without this field, which means it is necessarily running version 2 of corosync, the only cluster stack supported so far. |
Published field | Cluster.cluster_token | The secret key used by xapi-clusterd when it talks to itself on other hosts |
Published field | Cluster.other_config | Additional configuration |
Published field | Cluster.pending_forget | Internal field used by Host.destroy to store the IP of cluster members marked as permanently dead but not yet removed |
Published field | Cluster.pool_auto_join | True if automatically joining new pool members to the cluster. This will be `true` in the first release |
Published field | Cluster.uuid | Unique identifier/object reference |
Published field | Cluster_host.PIF | Reference to the PIF object |
Published field | Cluster_host.cluster | Reference to the Cluster object |
Published field | Cluster_host.enabled | Whether the cluster host believes that clustering should be enabled on this host. This field can be altered by calling the enable/disable message on a cluster host. Only enabled members run the underlying cluster stack. Disabled members are still considered a member of the cluster (see joined), and can be re-enabled by the user. |
Published field | Cluster_host.host | Reference to the Host object |
Published field | Cluster_host.joined | Whether the cluster host has joined the cluster. Contrary to enabled, a host that is not joined is not considered a member of the cluster, and hence enable and disable operations cannot be performed on this host. |
Published field | Cluster_host.other_config | Additional configuration |
Published field | Cluster_host.uuid | Unique identifier/object reference |
Published field | probe_result.complete | True if this configuration is complete and can be used to call SR.create. False if it requires further iterative calls to SR.probe, to potentially narrow down on a configuration that can be used. |
Published field | probe_result.configuration | Plugin-specific configuration which describes where and how to locate the storage repository. This may include the physical block device name, a remote NFS server and path or an RBD storage pool. |
Published field | probe_result.extra_info | Additional plugin-specific information about this configuration, that might be of use for an API user. This can for example include the LUN or the WWPN. |
Published field | probe_result.sr | Existing SR found for this configuration |
Published field | sr_stat.clustered | Indicates whether the SR uses clustered local storage. |
Published field | sr_stat.free_space | Number of bytes free on the backing storage (in bytes) |
Published field | sr_stat.health | The health status of the SR. |
Published field | sr_stat.name_description | Longer, human-readable description of the SR. Descriptions are generally only displayed by clients when the user is examining SRs in detail. |
Published field | sr_stat.name_label | Short, human-readable label for the SR. |
Published field | sr_stat.total_space | Total physical size of the backing storage (in bytes) |
Published field | sr_stat.uuid | Uuid that uniquely identifies this SR, if one is available. |
Published message | Cluster.create | Creates a Cluster object and one Cluster_host object as its first member |
Published message | Cluster.destroy | Destroys a Cluster object and the one remaining Cluster_host member |
Published message | Cluster.get_network | Returns the network used by the cluster for inter-host communication, i.e. the network shared by all cluster host PIFs |
Published message | Cluster.pool_create | Attempt to create a Cluster from the entire pool |
Published message | Cluster.pool_destroy | Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster. |
Published message | Cluster.pool_force_destroy | Attempt to force destroy the Cluster_host objects, and then destroy the Cluster. |
Published message | Cluster.pool_resync | Resynchronise the cluster_host objects across the pool. Creates them where they need creating and then plugs them |
Published message | Cluster_host.create | Add a new host to an existing cluster. |
Published message | Cluster_host.destroy | Remove the host from an existing cluster. This operation is allowed even if a cluster host is not enabled. |
Published message | Cluster_host.disable | Disable cluster membership for an enabled cluster host. |
Published message | Cluster_host.enable | Enable cluster membership for a disabled cluster host. |
Published message | Cluster_host.force_destroy | Remove a host from an existing cluster forcefully. |
Published message | SR.probe_ext | Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config. |
Changed field | Cluster.token_timeout | the unit is now seconds |
Changed field | Cluster.token_timeout_coefficient | the unit is now seconds |
XenServer 7.5
XenServer 7.5
Code name: "kolkata".Changes
Change | Element | Description |
---|---|---|
Prototyped class | Cluster | |
Prototyped class | Cluster_host | |
Prototyped class | probe_result | |
Prototyped class | sr_stat | |
Prototyped field | Cluster.cluster_config | |
Prototyped field | Cluster.cluster_hosts | |
Prototyped field | Cluster.cluster_stack | |
Prototyped field | Cluster.cluster_stack_version | |
Prototyped field | Cluster.cluster_token | |
Prototyped field | Cluster.other_config | |
Prototyped field | Cluster.pool_auto_join | |
Prototyped field | Cluster.token_timeout | the unit is milliseconds |
Prototyped field | Cluster.token_timeout_coefficient | the unit is milliseconds |
Prototyped field | Cluster.uuid | |
Prototyped field | Cluster_host.PIF | |
Prototyped field | Cluster_host.cluster | |
Prototyped field | Cluster_host.enabled | |
Prototyped field | Cluster_host.host | |
Prototyped field | Cluster_host.joined | |
Prototyped field | Cluster_host.other_config | |
Prototyped field | Cluster_host.uuid | |
Prototyped field | probe_result.complete | |
Prototyped field | probe_result.configuration | |
Prototyped field | probe_result.extra_info | |
Prototyped field | probe_result.sr | |
Prototyped field | sr_stat.clustered | |
Prototyped field | sr_stat.free_space | |
Prototyped field | sr_stat.health | |
Prototyped field | sr_stat.name_description | |
Prototyped field | sr_stat.name_label | |
Prototyped field | sr_stat.total_space | |
Prototyped field | sr_stat.uuid | |
Prototyped message | Cluster.create | |
Prototyped message | Cluster.destroy | |
Prototyped message | Cluster.get_network | |
Prototyped message | Cluster.pool_create | |
Prototyped message | Cluster.pool_destroy | |
Prototyped message | Cluster.pool_force_destroy | |
Prototyped message | Cluster.pool_resync | |
Prototyped message | Cluster_host.create | |
Prototyped message | Cluster_host.destroy | |
Prototyped message | Cluster_host.disable | |
Prototyped message | Cluster_host.enable | |
Prototyped message | Cluster_host.force_destroy | |
Prototyped message | SR.probe_ext | |
Published class | network_sriov | network-sriov which connects logical pif and physical pif |
Published field | PCI.driver_name | Driver name |
Published field | PIF.PCI | Link to underlying PCI device |
Published field | PIF.sriov_logical_PIF_of | Indicates which network_sriov this interface is logical of |
Published field | PIF.sriov_physical_PIF_of | Indicates which network_sriov this interface is physical of |
Published field | VM.domain_type | The field is now valid |
Published field | VM_metrics.current_domain_type | This field now contains valid data |
Published field | host.iscsi_iqn | The initiator IQN for the host |
Published field | host.multipathing | Specifies whether multipathing is enabled |
Published field | network_sriov.configuration_mode | The mode for configure network sriov |
Published field | network_sriov.logical_PIF | The logical PIF to connect to the SR-IOV network after enable SR-IOV on the physical PIF |
Published field | network_sriov.physical_PIF | The PIF that has SR-IOV enabled |
Published field | network_sriov.requires_reboot | Indicates whether the host need to be rebooted before SR-IOV is enabled on the physical PIF |
Published message | VM.set_domain_type | Set the VM.domain_type field of the given VM, which will take effect when it is next started |
Published message | host.set_iscsi_iqn | Sets the initiator IQN for the host |
Published message | host.set_multipathing | Specifies whether multipathing is enabled |
Published message | network_sriov.create | Enable SR-IOV on the specific PIF. It will create a network-sriov based on the specific PIF and automatically create a logical PIF to connect the specific network. |
Published message | network_sriov.destroy | Disable SR-IOV on the specific PIF. It will destroy the network-sriov and the logical PIF accordingly. |
Published message | network_sriov.get_remaining_capacity | Get the number of free SR-IOV VFs on the associated PIF |
Deprecated field | VM.HVM_boot_policy | Replaced by VM.domain_type |
Deprecated message | VM.set_HVM_boot_policy | Replaced by VM.set_domain_type |
XenServer 7.4
XenServer 7.4
Code name: "jura".Changes
Change | Element | Description |
---|---|---|
Prototyped field | VM.domain_type | Internal-only field; not yet in the public API |
Prototyped field | VM_metrics.current_domain_type | Not yet implemented (for future use) |
XenServer 7.3
XenServer 7.3
Code name: "inverness".Changes
Change | Element | Description |
---|---|---|
Published class | PUSB | A physical USB device |
Published class | USB_group | A group of compatible USBs across the resource pool |
Published class | VUSB | Describes the vusb device |
Published class | vdi_nbd_server_info | Details for connecting to a VDI using the Network Block Device protocol |
Published field | PGPU.compatibility_metadata | PGPU metadata to determine whether a VGPU can migrate between two PGPUs |
Published field | PIF.igmp_snooping_status | The IGMP snooping status of the corresponding network bridge |
Published field | PUSB.USB_group | USB group the PUSB is contained in |
Published field | PUSB.description | USB device description |
Published field | PUSB.host | Physical machine that owns the USB device |
Published field | PUSB.other_config | additional configuration |
Published field | PUSB.passthrough_enabled | enabled for passthrough |
Published field | PUSB.path | port path of USB device |
Published field | PUSB.product_desc | product description of the USB device |
Published field | PUSB.product_id | product id of the USB device |
Published field | PUSB.serial | serial of the USB device |
Published field | PUSB.uuid | Unique identifier/object reference |
Published field | PUSB.vendor_desc | vendor description of the USB device |
Published field | PUSB.vendor_id | vendor id of the USB device |
Published field | PUSB.version | USB device version |
Published field | USB_group.PUSBs | List of PUSBs in the group |
Published field | USB_group.VUSBs | List of VUSBs using the group |
Published field | USB_group.name_description | a notes field containing human-readable description |
Published field | USB_group.name_label | a human-readable name |
Published field | USB_group.other_config | Additional configuration |
Published field | USB_group.uuid | Unique identifier/object reference |
Published field | VDI.cbt_enabled | True if changed blocks are tracked for this VDI |
Published field | VGPU.compatibility_metadata | VGPU metadata to determine whether a VGPU can migrate between two PGPUs |
Published field | VUSB.USB_group | USB group used by the VUSB |
Published field | VUSB.VM | VM that owns the VUSB |
Published field | VUSB.other_config | Additional configuration |
Published field | VUSB.uuid | Unique identifier/object reference |
Published field | host.PUSBs | List of physical USBs in the host |
Published field | network.purpose | Set of purposes for which the server will use this network |
Published field | pool.igmp_snooping_enabled | true if IGMP snooping is enabled in the pool, false otherwise. |
Published field | pool_update.enforce_homogeneity | Flag - if true, all hosts in a pool must apply this update |
Published field | pool_update.other_config | additional configuration |
Published field | vdi_nbd_server_info.address | An address on which the server can be reached; this can be IPv4, IPv6, or a DNS name. |
Published field | vdi_nbd_server_info.cert | The TLS certificate of the server |
Published field | vdi_nbd_server_info.exportname | The exportname to request over NBD. This holds details including an authentication token, so it must be protected appropriately. Clients should regard the exportname as an opaque string or token. |
Published field | vdi_nbd_server_info.port | The TCP port |
Published field | vdi_nbd_server_info.subject | For convenience, this redundant field holds a DNS (hostname) subject of the certificate. This can be a wildcard, but only for a certificate that has a wildcard subject and no concrete hostname subjects. |
Published message | PUSB.scan | |
Published message | PUSB.set_passthrough_enabled | |
Published message | USB_group.create | |
Published message | USB_group.destroy | |
Published message | VDI.data_destroy | Delete the data of the snapshot VDI, but keep its changed block tracking metadata. When successful, this call changes the type of the VDI to cbt_metadata. This operation is idempotent: calling it on a VDI of type cbt_metadata results in a no-op, and no error will be thrown. |
Published message | VDI.disable_cbt | Disable changed block tracking for the VDI. This call is only allowed on VDIs that support enabling CBT. It is an idempotent operation - disabling CBT for a VDI for which CBT is not enabled results in a no-op, and no error will be thrown. |
Published message | VDI.enable_cbt | Enable changed block tracking for the VDI. This call is idempotent - enabling CBT for a VDI for which CBT is already enabled results in a no-op, and no error will be thrown. |
Published message | VDI.get_nbd_info | Get details specifying how to access this VDI via a Network Block Device server. For each of a set of NBD server addresses on which the VDI is available, the return value set contains a vdi_nbd_server_info object that contains an exportname to request once the NBD connection is established, and connection details for the address. An empty list is returned if there is no network that has a PIF on a host with access to the relevant SR, or if no such network has been assigned an NBD-related purpose in its purpose field. To access the given VDI, any of the vdi_nbd_server_info objects can be used to make a connection to a server, and then the VDI will be available by requesting the exportname. |
Published message | VDI.list_changed_blocks | Compare two VDIs in 64k block increments and report which blocks differ. This operation is not allowed when vdi_to is attached to a VM. |
Published message | VM.set_bios_strings | Set custom BIOS strings to this VM. VM will be given a default set of BIOS strings, only some of which can be overridden by the supplied values. Allowed keys are: 'bios-vendor', 'bios-version', 'system-manufacturer', 'system-product-name', 'system-version', 'system-serial-number', 'enclosure-asset-tag', 'baseboard-manufacturer', 'baseboard-product-name', 'baseboard-version', 'baseboard-serial-number', 'baseboard-asset-tag', 'baseboard-location-in-chassis', 'enclosure-asset-tag' |
Published message | VUSB.create | Create a new VUSB record in the database only |
Published message | VUSB.destroy | Removes a VUSB record from the database |
Published message | VUSB.unplug | Unplug the vusb device from the vm. |
Published message | network.add_purpose | Give a network a new purpose (if not present already) |
Published message | network.remove_purpose | Remove a purpose from a network (if present) |
Published message | pool.management_reconfigure | Reconfigure the management network interface for all Hosts in the Pool |
Published message | pool.set_igmp_snooping_enabled | Enable or disable IGMP Snooping on the pool. |
Changed message | host.get_server_certificate | Now available to all RBAC roles. |
Deprecated class | crashdump | |
Deprecated message | VM.get_boot_record | Use the current VM record/fields instead |
Removed message | VDI.resize_online | Online VDI resize is not supported by any of the storage backends. |
XenServer 7.2
XenServer 7.2
Code name: "falcon".Changes
Change | Element | Description |
---|---|---|
Published class | Feature | A new piece of functionality |
Published class | SDN_controller | Describes the SDN controller that is to connect with the pool |
Published class | VMSS | VM Snapshot Schedule |
Published field | Feature.enabled | Indicates whether the feature is enabled |
Published field | Feature.experimental | Indicates whether the feature is experimental (as opposed to stable and fully supported) |
Published field | Feature.host | The host where this feature is available |
Published field | Feature.uuid | Unique identifier/object reference |
Published field | Feature.version | The version of this feature |
Published field | SDN_controller.address | IP address of the controller |
Published field | SDN_controller.port | TCP port of the controller |
Published field | SDN_controller.protocol | Protocol to connect with SDN controller |
Published field | SDN_controller.uuid | Unique identifier/object reference |
Published field | VM.is_default_template | Identifies default templates |
Published field | VM.is_vmss_snapshot | true if this snapshot was created by the snapshot schedule |
Published field | VM.snapshot_schedule | Ref pointing to a snapshot schedule for this VM |
Published field | host.features | List of features available on this host |
Published field | network.managed | true if the bridge is managed by xapi |
Published message | SDN_controller.forget | Remove the OVS manager of the pool and destroy the db record. |
Published message | SDN_controller.introduce | Introduce an SDN controller to the pool. |
Published message | VM.set_snapshot_schedule | Set the value of the snapshot schedule field |
Published message | VMSS.add_to_schedule | |
Published message | VMSS.remove_from_schedule | |
Published message | VMSS.set_frequency | Set the value of the frequency field |
Published message | VMSS.set_last_run_time | |
Published message | VMSS.set_retained_snapshots | |
Published message | VMSS.set_schedule | |
Published message | VMSS.set_type | |
Published message | VMSS.snapshot_now | This call executes the snapshot schedule immediately |
Published message | task.set_status | Set the task status |
Changed field | network.bridge | Added to the constructor (network.create) |
Deprecated field | pool.vswitch_controller | Deprecated: set the IP address of the vswitch controller in SDN_controller instead. |
Deprecated message | pool.set_vswitch_controller | Deprecated: use 'SDN_controller.introduce' and 'SDN_controller.forget' instead. |
XenServer 7.1
XenServer 7.1
Code name: "ely".Changes
Change | Element | Description |
---|---|---|
Published class | PVS_cache_storage | Describes the storage that is available to a PVS site for caching purposes |
Published class | PVS_proxy | a proxy connects a VM/VIF with a PVS site |
Published class | PVS_server | individual machine serving provisioning (block) data |
Published class | PVS_site | machines serving blocks of data for provisioning VMs |
Published class | pool_update | Pool-wide updates to the host software |
Published field | PVS_cache_storage.SR | SR providing storage for the PVS cache |
Published field | PVS_cache_storage.VDI | The VDI used for caching |
Published field | PVS_cache_storage.host | The host on which this object defines PVS cache storage |
Published field | PVS_cache_storage.site | The PVS_site for which this object defines the storage |
Published field | PVS_cache_storage.size | The size of the cache VDI (in bytes) |
Published field | PVS_cache_storage.uuid | Unique identifier/object reference |
Published field | PVS_proxy.VIF | VIF of the VM using the proxy |
Published field | PVS_proxy.currently_attached | true = VM is currently proxied |
Published field | PVS_proxy.site | PVS site this proxy is part of |
Published field | PVS_proxy.status | The run-time status of the proxy |
Published field | PVS_proxy.uuid | Unique identifier/object reference |
Published field | PVS_server.addresses | IPv4 addresses of this server |
Published field | PVS_server.first_port | First UDP port accepted by this server |
Published field | PVS_server.last_port | Last UDP port accepted by this server |
Published field | PVS_server.site | PVS site this server is part of |
Published field | PVS_server.uuid | Unique identifier/object reference |
Published field | PVS_site.PVS_uuid | Unique identifier of the PVS site, as configured in PVS |
Published field | PVS_site.cache_storage | The SR used by PVS proxy for the cache |
Published field | PVS_site.name_description | a notes field containing human-readable description |
Published field | PVS_site.name_label | a human-readable name |
Published field | PVS_site.proxies | The set of proxies associated with the site |
Published field | PVS_site.servers | The set of PVS servers in the site |
Published field | PVS_site.uuid | Unique identifier/object reference |
Published field | VM.reference_label | Textual reference to the template used to create a VM. This can be used by clients in need of an immutable reference to the template since the latter's uuid and name_label may change, for example, after a package installation or upgrade. |
Published field | VM.requires_reboot | Indicates whether a VM requires a reboot in order to update its configuration, e.g. its memory allocation. |
Published field | VM_metrics.hvm | hardware virtual machine |
Published field | VM_metrics.nested_virt | VM supports nested virtualisation |
Published field | VM_metrics.nomigrate | VM is immobile and can't migrate between hosts |
Published field | host.control_domain | The control domain (domain 0) |
Published field | host.updates | Set of updates |
Published field | host.updates_requiring_reboot | List of updates which require reboot |
Published field | pool.live_patching_disabled | The pool-wide flag to show if the live patching feauture is disabled or not. |
Published field | pool_patch.pool_update | A reference to the associated pool_update object |
Published field | pool_update.after_apply_guidance | What the client should do after this update has been applied. |
Published field | pool_update.hosts | The hosts that have applied this update. |
Published field | pool_update.installation_size | Size of the update in bytes |
Published field | pool_update.key | GPG key of the update |
Published field | pool_update.version | Update version number |
Published message | PVS_proxy.create | Configure a VM/VIF to use a PVS proxy |
Published message | PVS_proxy.destroy | remove (or switch off) a PVS proxy for this VM |
Published message | PVS_server.forget | forget a PVS server |
Published message | PVS_server.introduce | introduce new PVS server |
Published message | PVS_site.forget | Remove a site's meta data |
Published message | PVS_site.introduce | Introduce new PVS site |
Published message | PVS_site.set_PVS_uuid | Update the PVS UUID of the PVS site |
Published message | VIF.move | Move the specified VIF to the specified network, even while the VM is running |
Published message | VM.set_memory | Set the memory allocation of this VM. Sets all of memory_static_max, memory_dynamic_min, and memory_dynamic_max to the given value, and leaves memory_static_min untouched. |
Published message | host.call_extension | Call an API extension on this host |
Published message | host.has_extension | Return true if the extension is available on the host |
Published message | pool_update.apply | Apply the selected update to a host |
Published message | pool_update.destroy | Removes the database entry. Only works on unapplied update. |
Published message | pool_update.introduce | Introduce update VDI |
Published message | pool_update.pool_apply | Apply the selected update to all hosts in the pool |
Published message | pool_update.pool_clean | Removes the update's files from all hosts in the pool, but does not revert the update |
Published message | pool_update.precheck | Execute the precheck stage of the selected update on a host |
Changed message | VM.set_VCPUs_number_live | Unless the feature is explicitly enabled for every host in the pool, this fails with Api_errors.license_restriction. |
Deprecated class | host_patch | |
Deprecated class | pool_patch | |
Deprecated field | VDI.parent | The field was never used. |
Deprecated field | host.patches | |
Deprecated message | host.refresh_pack_info | Use Pool_update.resync_host instead |
Deprecated message | pool_patch.apply | |
Deprecated message | pool_patch.clean | |
Deprecated message | pool_patch.clean_on_host | |
Deprecated message | pool_patch.destroy | |
Deprecated message | pool_patch.pool_apply | |
Deprecated message | pool_patch.pool_clean | |
Deprecated message | pool_patch.precheck |
XenServer 7.0
XenServer 7.0
Code name: "dundee".Changes
Change | Element | Description |
---|---|---|
Published class | LVHD | LVHD SR specific operations |
Published field | PIF.capabilities | Additional capabilities on the interface. |
Published field | SM.required_cluster_stack | The storage plugin requires that one of these cluster stacks is configured and running. |
Published field | SR.clustered | True if the SR is using aggregated local storage |
Published field | SR.is_tools_sr | True if this is the SR that contains the Tools ISO VDIs |
Published field | VDI.is_tools_iso | Whether this VDI is a Tools ISO |
Published field | VGPU.scheduled_to_be_resident_on | The PGPU on which this VGPU is scheduled to run |
Published field | VGPU_type.experimental | Indicates whether VGPUs of this type should be considered experimental |
Published field | VGPU_type.identifier | Key used to identify VGPU types and avoid creating duplicates - this field is used internally and not intended for interpretation by API clients |
Published field | VGPU_type.implementation | The internal implementation of this VGPU type |
Published field | VIF.ipv4_addresses | IPv4 addresses in CIDR format |
Published field | VIF.ipv4_configuration_mode | Determines whether IPv4 addresses are configured on the VIF |
Published field | VIF.ipv4_gateway | IPv4 gateway (the empty string means that no gateway is set) |
Published field | VIF.ipv6_addresses | IPv6 addresses in CIDR format |
Published field | VIF.ipv6_configuration_mode | Determines whether IPv6 addresses are configured on the VIF |
Published field | VIF.ipv6_gateway | IPv6 gateway (the empty string means that no gateway is set) |
Published field | VM.has_vendor_device | When an HVM guest starts, this controls the presence of the emulated C000 PCI device which triggers Windows Update to fetch or update PV drivers. |
Published field | VM_guest_metrics.PV_drivers_detected | At least one of the guest's devices has successfully connected to the backend. |
Published field | VM_guest_metrics.can_use_hotplug_vbd | To be used where relevant and available instead of checking PV driver version. |
Published field | VM_guest_metrics.can_use_hotplug_vif | To be used where relevant and available instead of checking PV driver version. |
Published field | host.ssl_legacy | Allow SSLv3 protocol and ciphersuites as used by older server versions. This controls both incoming and outgoing connections. When this is set to a different value, the host immediately restarts its SSL/TLS listening service; typically this takes less than a second but existing connections to it will be broken. API login sessions will remain valid. |
Published field | pool.cpu_info | Details about the physical CPUs on the pool |
Published field | pool.guest_agent_config | Pool-wide guest agent configuration information |
Published field | pool.ha_cluster_stack | The HA cluster stack that is currently in use. Only valid when HA is enabled. |
Published field | pool.health_check_config | Configuration for the automatic health check feature |
Published field | pool.policy_no_vendor_device | This field was consulted when VM.create did not specify a value for 'has_vendor_device'; VM.create now uses a simple default and no longer consults this value. |
Published field | task.backtrace | Function call trace for debugging. |
Published message | LVHD.enable_thin_provisioning | Upgrades an LVHD SR to enable thin-provisioning. Future VDIs created in this SR will be thinly-provisioned, although existing VDIs will be left alone. Note that the SR must be attached to the SRmaster for upgrade to work. |
Published message | SR.forget_data_source_archives | Forget the recorded statistics related to the specified data source |
Published message | SR.get_data_sources | |
Published message | SR.query_data_source | Query the latest value of the specified data source |
Published message | SR.record_data_source | Start recording the specified data source |
Published message | VIF.configure_ipv4 | Configure IPv4 settings for this virtual interface |
Published message | VIF.configure_ipv6 | Configure IPv6 settings for this virtual interface |
Published message | VM.import | Import an XVA from a URI |
Published message | VM.set_has_vendor_device | Controls whether, when the VM starts in HVM mode, its virtual hardware will include the emulated PCI device for which drivers may be available through Windows Update. Usually this should never be changed on a VM on which Windows has been installed: changing it on such a VM is likely to lead to a crash on next start. |
Published message | host.set_ssl_legacy | Enable/disable SSLv3 for interoperability with older server versions. When this is set to a different value, the host immediately restarts its SSL/TLS listening service; typically this takes less than a second but existing connections to it will be broken. API login sessions will remain valid. |
Published message | pool.add_to_guest_agent_config | Add a key-value pair to the pool-wide guest agent configuration |
Published message | pool.disable_ssl_legacy | Sets ssl_legacy false on each host, pool-master last. See Host.ssl_legacy and Host.set_ssl_legacy. |
Published message | pool.has_extension | Return true if the extension is available on the pool |
Published message | pool.remove_from_guest_agent_config | Remove a key-value pair from the pool-wide guest agent configuration |
Published message | session.create_from_db_file | |
Deprecated field | VM_guest_metrics.PV_drivers_up_to_date | Deprecated in favour of PV_drivers_detected, and redefined in terms of it |
Deprecated message | pool.enable_ssl_legacy | Legacy SSL will soon cease to be supported |
Removed message | host.reset_cpu_features | Manual CPU feature setting was removed |
Removed message | host.set_cpu_features | Manual CPU feature setting was removed |
XenServer 6.5 SP1 Hotfix 31
XenServer 6.5 SP1 Hotfix 31
Code name: "indigo".Changes
Change | Element | Description |
---|---|---|
Published message | host.license_add | Functionality for parsing license files re-added |
Published message | host.license_remove | Remove any license file from the specified host, and switch that host to the unlicensed edition |
XenServer 6.5 SP1
XenServer 6.5 SP1
Code name: "cream".Changes
Change | Element | Description |
---|---|---|
Published field | PGPU.dom0_access | The accessibility of this device from dom0 |
Published field | PGPU.is_system_display_device | Is this device the system display device |
Published field | VM.hardware_platform_version | The host virtual hardware platform version the VM can run on |
Published field | host.display | indicates whether the host is configured to output its console to a physical display device |
Published field | host.virtual_hardware_platform_versions | The set of versions of the virtual hardware platform that the host can offer to its guests |
Published message | PGPU.disable_dom0_access | |
Published message | PGPU.enable_dom0_access | |
Published message | VM.call_plugin | Call an API plugin on this vm |
Published message | host.disable_display | Disable console output to the physical display device next time this host boots |
Published message | host.enable_display | Enable console output to the physical display device next time this host boots |
XenServer 6.5
XenServer 6.5
Code name: "creedence".Changes
Change | Element | Description |
---|---|---|
Published field | PIF.properties | Additional configuration properties for the interface. |
Published field | network.assigned_ips | The IP addresses assigned to VIFs on networks that have active xapi-managed DHCP |
Published message | PIF.set_property | Set the value of a property of the PIF |
Published message | VM.get_SRs_required_for_recovery | List all the SR's that are required for the VM to be recovered |
Published message | VM_appliance.get_SRs_required_for_recovery | Get the list of SRs required by the VM appliance to recover. |
XenServer 6.2 SP1 Hotfix 11
XenServer 6.2 SP1 Hotfix 11
Code name: "clearwater-whetstone".Changes
Change | Element | Description |
---|---|---|
Published field | PCI.subsystem_device_name | Subsystem device name |
Published field | PCI.subsystem_vendor_name | Subsystem vendor name |
XenServer 6.2 SP1 Hotfix 4
XenServer 6.2 SP1 Hotfix 4
Code name: "clearwater-felton".Changes
Change | Element | Description |
---|---|---|
Extended message | VDI.copy | The copy can now be performed into a pre-created VDI. It is now possible to request copying only changed blocks from a base VDI |
XenServer 6.2 SP1
XenServer 6.2 SP1
Code name: "vgpu-productisation".Changes
Change | Element | Description |
---|---|---|
Published field | GPU_group.enabled_VGPU_types | vGPU types supported on at least one of the pGPUs in this group |
Published field | GPU_group.supported_VGPU_types | vGPU types supported on at least one of the pGPUs in this group |
Published field | PGPU.supported_VGPU_max_capacities | A map relating each VGPU type supported on this GPU to the maximum number of VGPUs of that type which can run simultaneously on this GPU |
Published field | PIF.managed | Indicates whether the interface is managed by xapi. If it is not, then xapi will not configure the interface, the commands PIF.plug/unplug/reconfigure_ip(v6) cannot be used, nor can the interface be bonded or have VLANs based on top through xapi. |
Published field | VGPU_type.enabled_on_GPU_groups | List of GPU groups in which at least one have this VGPU type enabled |
Published field | VGPU_type.max_resolution_x | Maximum resolution (width) supported by the VGPU type |
Published field | VGPU_type.max_resolution_y | Maximum resolution (height) supported by the VGPU type |
Published field | VGPU_type.supported_on_GPU_groups | List of GPU groups in which at least one PGPU supports this VGPU type |
XenServer 6.2 SP1 Tech-Preview
XenServer 6.2 SP1 Tech-Preview
Code name: "vgpu-tech-preview".Changes
Change | Element | Description |
---|---|---|
Published class | VGPU_type | A type of virtual GPU |
Published field | GPU_group.allocation_algorithm | Current allocation of vGPUs to pGPUs for this group |
Published field | PGPU.enabled_VGPU_types | List of VGPU types which have been enabled for this PGPU |
Published field | PGPU.resident_VGPUs | List of VGPUs running on this PGPU |
Published field | PGPU.supported_VGPU_types | List of VGPU types supported by the underlying hardware |
Published field | VGPU.resident_on | The PGPU on which this VGPU is running |
Published field | VGPU.type | Preset type for this VGPU |
Published field | VGPU_type.VGPUs | List of VGPUs of this type |
Published field | VGPU_type.enabled_on_PGPUs | List of PGPUs that have this VGPU type enabled |
Published field | VGPU_type.framebuffer_size | Framebuffer size of the VGPU type, in bytes |
Published field | VGPU_type.max_heads | Maximum number of displays supported by the VGPU type |
Published field | VGPU_type.model_name | Model name associated with the VGPU type |
Published field | VGPU_type.supported_on_PGPUs | List of PGPUs that support this VGPU type |
Published field | VGPU_type.uuid | Unique identifier/object reference |
Published field | VGPU_type.vendor_name | Name of VGPU vendor |
Published message | GPU_group.get_remaining_capacity | |
Published message | PGPU.add_enabled_VGPU_types | |
Published message | PGPU.get_remaining_capacity | |
Published message | PGPU.remove_enabled_VGPU_types | |
Published message | PGPU.set_GPU_group | |
Published message | PGPU.set_enabled_VGPU_types |
XenServer 6.2
XenServer 6.2
Code name: "clearwater".Changes
Change | Element | Description |
---|---|---|
Published field | SM.features | capabilities of the SM plugin, with capability version numbers |
Published field | VM.generation_id | Generation ID of the VM |
Published field | session.originator | a key string provided by a API user to distinguish itself from other users sharing the same login name |
Published message | VM.shutdown | Attempts to first clean shutdown a VM and if it should fail then perform a hard shutdown on it. |
Published message | host.declare_dead | Declare that a host is dead. This is a dangerous operation, and should only be called if the administrator is absolutely sure the host is definitely dead |
Published message | pool.apply_edition | Apply an edition to all hosts in the pool |
Published message | pool.get_license_state | This call returns the license state for the pool |
Deprecated field | SM.capabilities | Use SM.features instead |
Deprecated field | VM.protection_policy | The VMPR feature was removed |
Removed class | VMPP | The VMPR feature was removed |
Removed field | VM.is_snapshot_from_vmpp | The VMPR feature was removed |
Removed field | VMPP.VMs | The VMPR feature was removed |
Removed field | VMPP.alarm_config | The VMPR feature was removed |
Removed field | VMPP.archive_frequency | The VMPR feature was removed |
Removed field | VMPP.archive_last_run_time | The VMPR feature was removed |
Removed field | VMPP.archive_schedule | The VMPR feature was removed |
Removed field | VMPP.archive_target_config | The VMPR feature was removed |
Removed field | VMPP.archive_target_type | The VMPR feature was removed |
Removed field | VMPP.backup_frequency | The VMPR feature was removed |
Removed field | VMPP.backup_last_run_time | The VMPR feature was removed |
Removed field | VMPP.backup_retention_value | The VMPR feature was removed |
Removed field | VMPP.backup_schedule | The VMPR feature was removed |
Removed field | VMPP.backup_type | The VMPR feature was removed |
Removed field | VMPP.is_alarm_enabled | The VMPR feature was removed |
Removed field | VMPP.is_archive_running | The VMPR feature was removed |
Removed field | VMPP.is_backup_running | The VMPR feature was removed |
Removed field | VMPP.is_policy_enabled | The VMPR feature was removed |
Removed field | VMPP.recent_alerts | The VMPR feature was removed |
Removed field | VMPP.uuid | The VMPR feature was removed |
Removed message | VM.set_protection_policy | The VMPR feature was removed |
Removed message | VMPP.add_to_alarm_config | The VMPR feature was removed |
Removed message | VMPP.add_to_archive_schedule | The VMPR feature was removed |
Removed message | VMPP.add_to_archive_target_config | The VMPR feature was removed |
Removed message | VMPP.add_to_backup_schedule | The VMPR feature was removed |
Removed message | VMPP.archive_now | The VMPR feature was removed |
Removed message | VMPP.get_alerts | The VMPR feature was removed |
Removed message | VMPP.protect_now | The VMPR feature was removed |
Removed message | VMPP.remove_from_alarm_config | The VMPR feature was removed |
Removed message | VMPP.remove_from_archive_schedule | The VMPR feature was removed |
Removed message | VMPP.remove_from_archive_target_config | The VMPR feature was removed |
Removed message | VMPP.remove_from_backup_schedule | The VMPR feature was removed |
Removed message | VMPP.set_alarm_config | The VMPR feature was removed |
Removed message | VMPP.set_archive_frequency | The VMPR feature was removed |
Removed message | VMPP.set_archive_last_run_time | The VMPR feature was removed |
Removed message | VMPP.set_archive_schedule | The VMPR feature was removed |
Removed message | VMPP.set_archive_target_config | The VMPR feature was removed |
Removed message | VMPP.set_archive_target_type | The VMPR feature was removed |
Removed message | VMPP.set_backup_frequency | The VMPR feature was removed |
Removed message | VMPP.set_backup_last_run_time | The VMPR feature was removed |
Removed message | VMPP.set_backup_retention_value | The VMPR feature was removed |
Removed message | VMPP.set_backup_schedule | The VMPR feature was removed |
Removed message | VMPP.set_is_alarm_enabled | The VMPR feature was removed |
Removed message | host.license_apply | Free licenses no longer handled by xapi |
XenServer 6.1
XenServer 6.1
Code name: "tampa".Changes
Change | Element | Description |
---|---|---|
Published field | Bond.links_up | Number of links up in this bond |
Published field | Bond.properties | Additional configuration properties specific to the bond mode. |
Published field | PIF.IPv6 | IPv6 address |
Published field | PIF.ipv6_configuration_mode | Sets if and how this interface gets an IPv6 address |
Published field | PIF.ipv6_gateway | IPv6 gateway |
Published field | PIF.primary_address_type | Which protocol should define the primary address of this interface |
Published field | VIF.ipv4_allowed | A list of IPv4 addresses which can be used to filter traffic passing through this VIF |
Published field | VIF.ipv6_allowed | A list of IPv6 addresses which can be used to filter traffic passing through this VIF |
Published field | VIF.locking_mode | current locking mode of the VIF |
Published field | blob.public | True if the blob is publicly accessible |
Published field | host.guest_VCPUs_params | VCPUs params to apply to all resident guests |
Published field | network.default_locking_mode | The network will use this value to determine the behaviour of all VIFs where locking_mode = default |
Published message | Bond.set_property | Set the value of a property of the bond |
Published message | PIF.reconfigure_ipv6 | Reconfigure the IPv6 address settings for this interface |
Published message | PIF.set_primary_address_type | Change the primary address type used by this PIF |
Published message | VDI.pool_migrate | Migrate a VDI, which may be attached to a running guest, to a different SR. The destination SR must be visible to the guest. |
Published message | VIF.add_ipv4_allowed | Associates an IPv4 address with this VIF |
Published message | VIF.add_ipv6_allowed | Associates an IPv6 address with this VIF |
Published message | VIF.remove_ipv4_allowed | Removes an IPv4 address from this VIF |
Published message | VIF.remove_ipv6_allowed | Removes an IPv6 address from this VIF |
Published message | VIF.set_ipv4_allowed | Set the IPv4 addresses to which traffic on this VIF can be restricted |
Published message | VIF.set_ipv6_allowed | Set the IPv6 addresses to which traffic on this VIF can be restricted |
Published message | VIF.set_locking_mode | Set the locking mode for this VIF |
Published message | VM.assert_can_migrate | Assert whether a VM can be migrated to the specified destination. |
Published message | VM.import_convert | Import using a conversion service. |
Published message | VM.migrate_send | Migrate the VM to another host. This can only be called when the specified VM is in the Running state. |
Published message | VM.query_services | Query the system services advertised by this VM and register them. This can only be applied to a system domain. |
Published message | event.inject | Injects an artificial event on the given object and returns the corresponding ID in the form of a token, which can be used as a point of reference for database events. For example, to check whether an object has reached the right state before attempting an operation, one can inject an artificial event on the object and wait until the token returned by consecutive event.from calls is lexicographically greater than the one returned by event.inject. |
Published message | host.get_management_interface | Returns the management interface for the specified host |
Published message | host.migrate_receive | Prepare to receive a VM, returning a token which can be passed to VM.migrate. |
Published message | network.set_default_locking_mode | Set the default locking mode for VIFs attached to this network |
Published message | pool_patch.clean_on_host | Removes the patch's files from the specified host |
Published message | pool_patch.pool_clean | Removes the patch's files from all hosts in the pool, but does not remove the database entries |
Deprecated message | VM.get_cooperative | |
Deprecated message | host.get_uncooperative_resident_VMs | |
Removed class | VBD_metrics | Disabled in favour of RRD |
Removed class | VIF_metrics | Disabled in favour of RRDs |
Removed field | PIF_metrics.io_read_kbs | Disabled and replaced by RRDs |
Removed field | PIF_metrics.io_write_kbs | Disabled and replaced by RRDs |
Removed field | VBD.metrics | Disabled in favour of RRDs |
Removed field | VBD_metrics.io_read_kbs | Disabled and replaced by RRDs |
Removed field | VBD_metrics.io_write_kbs | Disabled and replaced by RRDs |
Removed field | VBD_metrics.last_updated | Disabled in favour of RRD |
Removed field | VBD_metrics.other_config | Disabled in favour of RRD |
Removed field | VIF.metrics | Disabled in favour of RRDs |
Removed field | VIF_metrics.io_read_kbs | Disabled and replaced by RRDs |
Removed field | VIF_metrics.io_write_kbs | Disabled and replaced by RRDs |
Removed field | VM_metrics.VCPUs_utilisation | Disabled in favour of RRDs |
Removed field | host_metrics.memory_free | Disabled in favour of RRD |
XenServer 6.0
XenServer 6.0
Code name: "boston".Changes
Change | Element | Description |
---|---|---|
Published class | DR_task | DR task |
Published class | GPU_group | A group of compatible GPUs across the resource pool |
Published class | PCI | A PCI device |
Published class | PGPU | A physical GPU (pGPU) |
Published class | VGPU | A virtual GPU (vGPU) |
Published class | VM_appliance | VM appliance |
Published field | Bond.mode | The algorithm used to distribute traffic among the bonded NICs |
Published field | Bond.primary_slave | The PIF of which the IP configuration and MAC were copied to the bond, and which will receive all configuration/VLANs/VIFs on the bond if the bond is destroyed |
Published field | GPU_group.GPU_types | List of GPU types (vendor+device ID) that can be in this group |
Published field | GPU_group.PGPUs | List of pGPUs in the group |
Published field | GPU_group.VGPUs | List of vGPUs using the group |
Published field | GPU_group.name_description | a notes field containing human-readable description |
Published field | GPU_group.name_label | a human-readable name |
Published field | GPU_group.other_config | Additional configuration |
Published field | GPU_group.uuid | Unique identifier/object reference |
Published field | PCI.class_name | PCI class name |
Published field | PCI.dependencies | List of dependent PCI devices |
Published field | PCI.device_name | Device name |
Published field | PCI.host | Physical machine that owns the PCI device |
Published field | PCI.other_config | Additional configuration |
Published field | PCI.pci_id | PCI ID of the physical device |
Published field | PCI.uuid | Unique identifier/object reference |
Published field | PCI.vendor_name | Vendor name |
Published field | PGPU.GPU_group | GPU group the pGPU is contained in |
Published field | PGPU.PCI | Link to underlying PCI device |
Published field | PGPU.host | Host that owns the GPU |
Published field | PGPU.other_config | Additional configuration |
Published field | PGPU.uuid | Unique identifier/object reference |
Published field | SR.introduced_by | The disaster recovery task which introduced this SR |
Published field | VDI.metadata_latest | Whether this VDI contains the latest known accessible metadata for the pool |
Published field | VDI.metadata_of_pool | The pool whose metadata is contained in this VDI |
Published field | VGPU.GPU_group | GPU group used by the vGPU |
Published field | VGPU.VM | VM that owns the vGPU |
Published field | VGPU.currently_attached | Reflects whether the virtual device is currently connected to a physical device |
Published field | VGPU.device | Order in which the devices are plugged into the VM |
Published field | VGPU.other_config | Additional configuration |
Published field | VGPU.uuid | Unique identifier/object reference |
Published field | VM.VGPUs | Virtual GPUs |
Published field | VM.attached_PCIs | Currently passed-through PCI devices |
Published field | VM.order | The point in the startup or shutdown sequence at which this VM will be started |
Published field | VM.shutdown_delay | The delay to wait before proceeding to the next order in the shutdown sequence (seconds) |
Published field | VM.start_delay | The delay to wait before proceeding to the next order in the startup sequence (seconds) |
Published field | VM.suspend_SR | The SR on which a suspend image is stored |
Published field | VM.version | The number of times this VM has been recovered |
Published field | event.snapshot | The record of the database object that was added, changed or deleted |
Published field | host.PCIs | List of PCI devices in the host |
Published field | host.PGPUs | List of physical GPUs in the host |
Published field | host.chipset_info | Information about chipset features |
Published field | pool.metadata_VDIs | The set of currently known metadata VDIs for this pool |
Published message | Bond.set_mode | Change the bond mode |
Published message | DR_task.create | Create a disaster recovery task which will query the supplied list of devices |
Published message | DR_task.destroy | Destroy the disaster recovery task, detaching and forgetting any SRs introduced which are no longer required |
Published message | GPU_group.create | |
Published message | GPU_group.destroy | |
Published message | SR.assert_supports_database_replication | Returns successfully if the given SR supports database replication. Otherwise returns an error to explain why not. |
Published message | SR.disable_database_replication | |
Published message | SR.enable_database_replication | |
Published message | VDI.open_database | Load the metadata found on the supplied VDI and return a session reference which can be used in API calls to query its contents. |
Published message | VDI.read_database_pool_uuid | Check the VDI cache for the pool UUID of the database on this VDI. |
Published message | VGPU.create | |
Published message | VGPU.destroy | |
Published message | VIF.unplug_force | Forcibly unplug the specified VIF |
Published message | VM.assert_can_be_recovered | Assert whether all SRs required to recover this VM are available. |
Published message | VM.recover | Recover the VM |
Published message | VM.set_appliance | Assign this VM to an appliance. |
Published message | VM.set_order | Set this VM's boot order |
Published message | VM.set_shutdown_delay | Set this VM's shutdown delay in seconds |
Published message | VM.set_start_delay | Set this VM's start delay in seconds |
Published message | VM.set_suspend_VDI | Set this VM's suspend VDI, which must be indentical to its current one |
Published message | VM_appliance.assert_can_be_recovered | Assert whether all SRs required to recover this VM appliance are available. |
Published message | VM_appliance.clean_shutdown | Perform a clean shutdown of all the VMs in the appliance |
Published message | VM_appliance.hard_shutdown | Perform a hard shutdown of all the VMs in the appliance |
Published message | VM_appliance.recover | Recover the VM appliance |
Published message | VM_appliance.shutdown | For each VM in the appliance, try to shut it down cleanly. If this fails, perform a hard shutdown of the VM. |
Published message | VM_appliance.start | Start all VMs in the appliance |
Published message | event.from | Blocking call which returns a new token and a (possibly empty) batch of events. The returned token can be used in subsequent calls to this function. |
Deprecated field | VM.PCI_bus | Field was never used |
Deprecated field | VM.ha_always_run | |
Deprecated field | event.obj_uuid | |
Deprecated field | event.timestamp | |
Deprecated message | VM.set_ha_always_run | |
Deprecated message | event.next | |
Deprecated message | event.register | |
Deprecated message | event.unregister |
XenServer 5.6 FP1
XenServer 5.6 FP1
Code name: "cowley".Changes
Change | Element | Description |
---|---|---|
Published class | VMPP | VM Protection Policy |
Published class | tunnel | A tunnel for network traffic |
Published field | PIF.tunnel_access_PIF_of | Indicates to which tunnel this PIF gives access |
Published field | PIF.tunnel_transport_PIF_of | Indicates to which tunnel this PIF provides transport |
Published field | SR.local_cache_enabled | True if this SR is assigned to be the local cache for its host |
Published field | VDI.allow_caching | true if this VDI is to be cached in the local cache SR |
Published field | VDI.on_boot | The behaviour of this VDI on a VM boot |
Published field | VM.is_snapshot_from_vmpp | true if this snapshot was created by the protection policy |
Published field | VM.protection_policy | Ref pointing to a protection policy for this VM |
Published field | VMPP.VMs | all VMs attached to this protection policy |
Published field | VMPP.alarm_config | configuration for the alarm |
Published field | VMPP.archive_frequency | frequency of the archive schedule |
Published field | VMPP.archive_last_run_time | time of the last archive |
Published field | VMPP.archive_schedule | schedule of the archive containing 'hour', 'min', 'days'. Date/time-related information is in Local Timezone |
Published field | VMPP.archive_target_config | configuration for the archive, including its 'location', 'username', 'password' |
Published field | VMPP.archive_target_type | type of the archive target config |
Published field | VMPP.backup_frequency | frequency of the backup schedule |
Published field | VMPP.backup_last_run_time | time of the last backup |
Published field | VMPP.backup_retention_value | maximum number of backups that should be stored at any time |
Published field | VMPP.backup_schedule | schedule of the backup containing 'hour', 'min', 'days'. Date/time-related information is in Local Timezone |
Published field | VMPP.backup_type | type of the backup sub-policy |
Published field | VMPP.is_alarm_enabled | true if alarm is enabled for this policy |
Published field | VMPP.is_archive_running | true if this protection policy's archive is running |
Published field | VMPP.is_backup_running | true if this protection policy's backup is running |
Published field | VMPP.is_policy_enabled | enable or disable this policy |
Published field | VMPP.recent_alerts | recent alerts |
Published field | VMPP.uuid | Unique identifier/object reference |
Published field | host.local_cache_sr | The SR that is used as a local cache |
Published field | tunnel.access_PIF | The interface through which the tunnel is accessed |
Published field | tunnel.other_config | Additional configuration |
Published field | tunnel.status | Status information about the tunnel |
Published field | tunnel.transport_PIF | The interface used by the tunnel |
Published field | tunnel.uuid | Unique identifier/object reference |
Published message | VDI.set_allow_caching | Set the value of the allow_caching parameter. This value can only be changed when the VDI is not attached to a running VM. The caching behaviour is only affected by this flag for VHD-based VDIs that have one parent and no child VHDs. Moreover, caching only takes place when the host running the VM containing this VDI has a nominated SR for local caching. |
Published message | VDI.set_on_boot | Set the value of the on_boot parameter. This value can only be changed when the VDI is not attached to a running VM. |
Published message | VM.set_protection_policy | Set the value of the protection_policy field |
Published message | VMPP.add_to_alarm_config | |
Published message | VMPP.add_to_archive_schedule | |
Published message | VMPP.add_to_archive_target_config | |
Published message | VMPP.add_to_backup_schedule | |
Published message | VMPP.archive_now | This call archives the snapshot provided as a parameter |
Published message | VMPP.get_alerts | This call fetches a history of alerts for a given protection policy |
Published message | VMPP.protect_now | This call executes the protection policy immediately |
Published message | VMPP.remove_from_alarm_config | |
Published message | VMPP.remove_from_archive_schedule | |
Published message | VMPP.remove_from_archive_target_config | |
Published message | VMPP.remove_from_backup_schedule | |
Published message | VMPP.set_alarm_config | |
Published message | VMPP.set_archive_frequency | Set the value of the archive_frequency field |
Published message | VMPP.set_archive_last_run_time | |
Published message | VMPP.set_archive_schedule | |
Published message | VMPP.set_archive_target_config | |
Published message | VMPP.set_archive_target_type | Set the value of the archive_target_config_type field |
Published message | VMPP.set_backup_frequency | Set the value of the backup_frequency field |
Published message | VMPP.set_backup_last_run_time | |
Published message | VMPP.set_backup_retention_value | |
Published message | VMPP.set_backup_schedule | |
Published message | VMPP.set_is_alarm_enabled | Set the value of the is_alarm_enabled field |
Published message | host.disable_local_storage_caching | Disable the use of a local SR for caching purposes |
Published message | host.enable_local_storage_caching | Enable the use of a local SR for caching purposes |
Published message | host.get_server_localtime | This call queries the host's clock for the current time in the host's local timezone |
Published message | host.set_power_on_mode | Set the power-on-mode, host, user and password |
Published message | pool.disable_local_storage_caching | This call disables pool-wide local storage caching |
Published message | pool.enable_local_storage_caching | This call attempts to enable pool-wide local storage caching |
Published message | pool.test_archive_target | This call tests if a location is valid |
Published message | tunnel.create | Create a tunnel |
Published message | tunnel.destroy | Destroy a tunnel |
Extended message | VDI.copy | The copy can now be performed between any two SRs. |
Extended message | VM.copy | The copy can now be performed between any two SRs. |
Extended message | pool.set_vswitch_controller | Allow to be set to the empty string (no controller is used). |
XenServer 5.6
XenServer 5.6
Code name: "midnight-ride".Changes
Change | Element | Description |
---|---|---|
Published class | role | A set of permissions associated with a subject |
Published class | secret | A secret |
Published field | VM.bios_strings | BIOS strings |
Published field | VM.children | List pointing to all the children of this VM |
Published field | VM.parent | Ref pointing to the parent of this VM |
Published field | VM.snapshot_info | Human-readable information concerning this snapshot |
Published field | VM.snapshot_metadata | Encoded information about the VM's metadata this is a snapshot of |
Published field | host.bios_strings | BIOS strings |
Published field | host.cpu_info | Details about the physical CPUs on this host |
Published field | host.edition | Product edition |
Published field | host.license_server | Contact information of the license server |
Published field | host.power_on_config | The power on config |
Published field | host.power_on_mode | The power on mode |
Published field | network.MTU | MTU in octets |
Published field | pool.redo_log_enabled | true a redo-log is to be used other than when HA is enabled, false otherwise |
Published field | pool.redo_log_vdi | indicates the VDI to use for the redo-log other than when HA is enabled |
Published field | pool.restrictions | Pool-wide restrictions currently in effect |
Published field | pool.vswitch_controller | the IP address of the vswitch controller. |
Published field | role.name_description | what this role is for |
Published field | role.name_label | a short user-friendly name for the role |
Published field | role.subroles | a list of pointers to other roles or permissions |
Published field | session.auth_user_name | the subject name of the user that was externally authenticated. If a session instance has is_local_superuser set, then the value of this field is undefined. |
Published field | session.parent | references the parent session that created this session |
Published field | session.rbac_permissions | list with all RBAC permissions for this session |
Published field | session.tasks | list of tasks created using the current session |
Published field | subject.roles | the roles associated with this subject |
Published message | VM.checkpoint | Checkpoints the specified VM, making a new VM. Checkpoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well. |
Published message | VM.compute_memory_overhead | Computes the virtualization memory overhead of a VM. |
Published message | VM.copy_bios_strings | Copy the BIOS strings from the given host to this VM |
Published message | VM.get_cooperative | Return true if the VM is currently 'co-operative' i.e. is expected to reach a balloon target and actually has done |
Published message | VM.revert | Reverts the specified VM to a previous state. |
Published message | VM.set_HVM_shadow_multiplier | Set the shadow memory multiplier on a halted VM |
Published message | VM.set_VCPUs_at_startup | Set the number of startup VCPUs for a halted VM |
Published message | VM.set_VCPUs_max | Set the maximum number of VCPUs for a halted VM |
Published message | VM.set_memory_dynamic_max | Set the value of the memory_dynamic_max field |
Published message | VM.set_memory_dynamic_min | Set the value of the memory_dynamic_min field |
Published message | VM.set_memory_dynamic_range | Set the minimum and maximum amounts of physical memory the VM is allowed to use. |
Published message | VM.set_memory_limits | Set the memory limits of this VM. |
Published message | VM.set_memory_static_min | Set the value of the memory_static_min field |
Published message | VM.set_memory_static_range | Set the static (ie boot-time) range of virtual memory that the VM is allowed to use. |
Published message | host.apply_edition | Change to another edition, or reactivate the current edition after a license has expired. This may be subject to the successful checkout of an appropriate license. |
Published message | host.compute_memory_overhead | Computes the virtualization memory overhead of a host. |
Published message | host.get_uncooperative_resident_VMs | Return a set of VMs which are not co-operating with the host's memory control system |
Published message | host.refresh_pack_info | Refresh the list of installed Supplemental Packs. |
Published message | host.reset_cpu_features | Remove the feature mask, such that after a reboot all features of the CPU are enabled. |
Published message | host.set_cpu_features | Set the CPU features to be used after a reboot, if the given features string is valid. |
Published message | pool.disable_redo_log | Disable the redo log if in use, unless HA is enabled. |
Published message | pool.enable_redo_log | Enable the redo log on the given SR and start using it, unless HA is enabled. |
Published message | pool.set_vswitch_controller | Set the IP address of the vswitch controller. |
Published message | role.get_by_permission | This call returns a list of roles given a permission |
Published message | role.get_by_permission_name_label | This call returns a list of roles given a permission name |
Published message | role.get_permissions | This call returns a list of permissions given a role |
Published message | role.get_permissions_name_label | This call returns a list of permission names given a role |
Published message | subject.add_to_roles | This call adds a new role to a subject |
Published message | subject.get_permissions_name_label | This call returns a list of permission names given a subject |
Published message | subject.remove_from_roles | This call removes a role from a subject |
Deprecated class | host_cpu | Deprecated in favour of the Host.cpu_info field |
Deprecated field | VM.memory_target | |
Deprecated field | host_metrics.memory_free | Will be disabled in favour of RRD |
Deprecated message | VM.set_memory_target_live | |
Deprecated message | VM.wait_memory_target_live |
XenServer 5.5
XenServer 5.5
Code name: "george".Changes
Change | Element | Description |
---|---|---|
Published class | auth | Management of remote authentication services |
Published class | subject | A user or group that can log in xapi |
Published field | VIF.MAC_autogenerated | true if the MAC was autogenerated; false indicates it was set manually |
Published field | host.external_auth_configuration | configuration specific to external authentication service |
Published field | host.external_auth_service_name | name of external authentication service configured; empty if none configured. |
Published field | host.external_auth_type | type of external authentication service configured; empty if none configured. |
Published field | pool.wlb_enabled | true if workload balancing is enabled on the pool, false otherwise |
Published field | pool.wlb_url | Url for the configured workload balancing host |
Published field | pool.wlb_username | Username for accessing the workload balancing host |
Published field | pool.wlb_verify_cert | true if communication with the WLB server should enforce TLS certificate verification. |
Published field | session.auth_user_sid | the subject identifier of the user that was externally authenticated. If a session instance has is_local_superuser set, then the value of this field is undefined. |
Published field | session.is_local_superuser | true iff this session was created using local superuser credentials |
Published field | session.subject | references the subject instance that created the session. If a session instance has is_local_superuser set, then the value of this field is undefined. |
Published field | session.validation_time | time when session was last validated |
Published field | subject.other_config | additional configuration |
Published field | subject.subject_identifier | the subject identifier, unique in the external directory service |
Published message | VDI.set_sharable | Sets the VDI's sharable field |
Published message | VM.retrieve_wlb_recommendations | Returns mapping of hosts to ratings, indicating the suitability of starting the VM at that location according to wlb. Rating is replaced with an error if the VM cannot boot there. |
Published message | auth.get_group_membership | This calls queries the external directory service to obtain the transitively-closed set of groups that the the subject_identifier is member of. |
Published message | auth.get_subject_identifier | This call queries the external directory service to obtain the subject_identifier as a string from the human-readable subject_name |
Published message | auth.get_subject_information_from_identifier | This call queries the external directory service to obtain the user information (e.g. username, organization etc) from the specified subject_identifier |
Published message | host.disable_external_auth | This call disables external authentication on the local host |
Published message | host.enable_external_auth | This call enables external authentication on a host |
Published message | host.get_server_certificate | Get the installed server public TLS certificate. |
Published message | host.retrieve_wlb_evacuate_recommendations | Retrieves recommended host migrations to perform when evacuating the host from the wlb server. If a VM cannot be migrated from the host the reason is listed instead of a recommendation. |
Published message | pool.certificate_install | Install TLS CA certificate |
Published message | pool.certificate_list | List installed TLS CA certificate |
Published message | pool.certificate_sync | Copy the TLS CA certificates and CRLs of the master to all slaves. |
Published message | pool.certificate_uninstall | Install TLS CA certificate |
Published message | pool.crl_install | Install a TLS CA-issued Certificate Revocation List, pool-wide. |
Published message | pool.crl_list | List the names of all installed TLS CA-issued Certificate Revocation Lists. |
Published message | pool.crl_uninstall | Remove a pool-wide TLS CA-issued Certificate Revocation List. |
Published message | pool.deconfigure_wlb | Permanently deconfigures workload balancing monitoring on this pool |
Published message | pool.detect_nonhomogeneous_external_auth | This call asynchronously detects if the external authentication configuration in any slave is different from that in the master and raises appropriate alerts |
Published message | pool.disable_external_auth | This call disables external authentication on all the hosts of the pool |
Published message | pool.enable_external_auth | This call enables external authentication on all the hosts of the pool |
Published message | pool.initialize_wlb | Initializes workload balancing monitoring on this pool with the specified wlb server |
Published message | pool.retrieve_wlb_configuration | Retrieves the pool optimization criteria from the workload balancing server |
Published message | pool.retrieve_wlb_recommendations | Retrieves vm migrate recommendations for the pool from the workload balancing server |
Published message | pool.send_test_post | Send the given body to the given host and port, using HTTPS, and print the response. This is used for debugging the SSL layer. |
Published message | pool.send_wlb_configuration | Sets the pool optimization criteria for the workload balancing server |
Published message | session.get_all_subject_identifiers | Return a list of all the user subject-identifiers of all existing sessions |
Published message | session.logout_subject_identifier | Log out all sessions associated to a user subject-identifier, except the session associated with the context calling this function |
Deprecated class | user | Deprecated in favor of subject |
Removed field | VM_guest_metrics.memory | Disabled in favour of the RRDs, to improve scalability |
XenServer 5.0 Update 1
XenServer 5.0 Update 1
Code name: "orlando-update-1".Changes
Change | Element | Description |
---|---|---|
Published message | pool.ha_prevent_restarts_for | When this call returns the VM restart logic will not run for the requested number of seconds. If the argument is zero then the restart thread is immediately unblocked |
XenServer 5.0
XenServer 5.0
Code name: "orlando".Changes
Change | Element | Description |
---|---|---|
Published class | blob | A placeholder for a binary blob |
Published class | data_source | Data sources for logging in RRDs |
Published class | message | An message for the attention of the administrator |
Published field | PIF.disallow_unplug | Prevent this PIF from being unplugged; set this to notify the management tool-stack that the PIF has a special use and should not be unplugged under any circumstances (e.g. because you're running storage traffic over it) |
Published field | PIF_metrics.other_config | additional configuration |
Published field | SM.driver_filename | filename of the storage driver |
Published field | SR.blobs | Binary blobs associated with this SR |
Published field | SR.tags | user-specified tags for categorization purposes |
Published field | VBD_metrics.other_config | additional configuration |
Published field | VDI.is_a_snapshot | true if this is a snapshot. |
Published field | VDI.snapshot_of | Ref pointing to the VDI this snapshot is of. |
Published field | VDI.snapshot_time | Date/time when this snapshot was created. |
Published field | VDI.snapshots | List pointing to all the VDIs snapshots. |
Published field | VDI.tags | user-specified tags for categorization purposes |
Published field | VIF_metrics.other_config | additional configuration |
Published field | VM.blobs | Binary blobs associated with this VM |
Published field | VM.blocked_operations | List of operations which have been explicitly blocked and an error code |
Published field | VM.ha_always_run | if true then the system will attempt to keep the VM running as much as possible. |
Published field | VM.ha_restart_priority | has possible values: "best-effort" meaning "try to restart this VM if possible but don't consider the Pool to be overcommitted if this is not possible"; "restart" meaning "this VM should be restarted"; "" meaning "do not try to restart this VM" |
Published field | VM.is_a_snapshot | true if this is a snapshot. Snapshotted VMs can never be started, they are used only for cloning other VMs |
Published field | VM.snapshot_of | Ref pointing to the VM this snapshot is of. |
Published field | VM.snapshot_time | Date/time when this snapshot was created. |
Published field | VM.snapshots | List pointing to all the VM snapshots. |
Published field | VM.tags | user-specified tags for categorization purposes |
Published field | VM.transportable_snapshot_id | Transportable ID of the snapshot VM |
Published field | VM_guest_metrics.live | True if the guest is sending heartbeat messages via the guest agent |
Published field | VM_guest_metrics.other_config | additional configuration |
Published field | VM_metrics.other_config | additional configuration |
Published field | host.blobs | Binary blobs associated with this host |
Published field | host.ha_network_peers | The set of hosts visible via the network from this host |
Published field | host.ha_statefiles | The set of statefiles accessible from this host |
Published field | host.tags | user-specified tags for categorization purposes |
Published field | host_cpu.other_config | additional configuration |
Published field | host_metrics.other_config | additional configuration |
Published field | message.cls | The class of the object this message is associated with |
Published field | network.blobs | Binary blobs associated with this network |
Published field | network.tags | user-specified tags for categorization purposes |
Published field | pool.blobs | Binary blobs associated with this pool |
Published field | pool.gui_config | gui-specific configuration for pool |
Published field | pool.ha_allow_overcommit | If set to false then operations which would cause the Pool to become overcommitted will be blocked. |
Published field | pool.ha_configuration | The current HA configuration |
Published field | pool.ha_enabled | true if HA is enabled on the pool, false otherwise |
Published field | pool.ha_host_failures_to_tolerate | Number of host failures to tolerate before the Pool is declared to be overcommitted |
Published field | pool.ha_overcommitted | True if the Pool is considered to be overcommitted i.e. if there exist insufficient physical resources to tolerate the configured number of host failures |
Published field | pool.ha_plan_exists_for | Number of future host failures we have managed to find a plan for. Once this reaches zero any future host failures will cause the failure of protected VMs. |
Published field | pool.ha_statefiles | HA statefile VDIs in use |
Published field | pool.tags | user-specified tags for categorization purposes |
Published field | task.subtask_of | Ref pointing to the task this is a substask of. |
Published field | task.subtasks | List pointing to all the substasks. |
Published field | user.other_config | additional configuration |
Published message | PIF.db_forget | Destroy a PIF database record. |
Published message | PIF.db_introduce | Create a new PIF record in the database only |
Published message | PIF.set_disallow_unplug | Set whether unplugging the PIF is allowed |
Published message | SR.assert_can_host_ha_statefile | Returns successfully if the given SR can host an HA statefile. Otherwise returns an error to explain why not |
Published message | SR.create_new_blob | Create a placeholder for a named binary blob of data that is associated with this SR |
Published message | VM.assert_agile | Returns an error if the VM is not considered agile e.g. because it is tied to a resource local to a host |
Published message | VM.create_new_blob | Create a placeholder for a named binary blob of data that is associated with this VM |
Published message | VM.forget_data_source_archives | Forget the recorded statistics related to the specified data source |
Published message | VM.get_data_sources | |
Published message | VM.query_data_source | Query the latest value of the specified data source |
Published message | VM.record_data_source | Start recording the specified data source |
Published message | VM.set_ha_always_run | Set the value of the ha_always_run |
Published message | VM.set_ha_restart_priority | Set the value of the ha_restart_priority field |
Published message | VM.set_memory_static_max | Set the value of the memory_static_max field |
Published message | VM.snapshot | Snapshots the specified VM, making a new VM. Snapshot automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write). |
Published message | VM.snapshot_with_quiesce | Snapshots the specified VM with quiesce, making a new VM. Snapshot automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write). |
Published message | VM.wait_memory_target_live | Wait for a running VM to reach its current memory target |
Published message | blob.create | Create a placeholder for a binary blob |
Published message | blob.destroy | |
Published message | host.backup_rrds | This causes the RRDs to be backed up to the master |
Published message | host.call_plugin | Call an API plugin on this host |
Published message | host.compute_free_memory | Computes the amount of free memory on the host. |
Published message | host.create_new_blob | Create a placeholder for a named binary blob of data that is associated with this host |
Published message | host.emergency_ha_disable | This call disables HA on the local host. This should only be used with extreme care. |
Published message | host.forget_data_source_archives | Forget the recorded statistics related to the specified data source |
Published message | host.get_data_sources | |
Published message | host.get_servertime | This call queries the host's clock for the current time |
Published message | host.get_vms_which_prevent_evacuation | Return a set of VMs which prevent the host being evacuated, with per-VM error codes |
Published message | host.power_on | Attempt to power-on the host (if the capability exists). |
Published message | host.query_data_source | Query the latest value of the specified data source |
Published message | host.record_data_source | Start recording the specified data source |
Published message | host.shutdown_agent | Shuts the agent down after a 10 second pause. WARNING: this is a dangerous operation. Any operations in progress will be aborted, and unrecoverable data loss may occur. The caller is responsible for ensuring that there are no operations in progress when this method is called. |
Published message | host.sync_data | This causes the synchronisation of the non-database data (messages, RRDs and so on) stored on the master to be synchronised with the host |
Published message | message.create | |
Published message | message.destroy | |
Published message | message.get | |
Published message | message.get_all | |
Published message | message.get_all_records | |
Published message | message.get_all_records_where | |
Published message | message.get_by_uuid | |
Published message | message.get_record | |
Published message | message.get_since | |
Published message | network.create_new_blob | Create a placeholder for a named binary blob of data that is associated with this pool |
Published message | pool.create_new_blob | Create a placeholder for a named binary blob of data that is associated with this pool |
Published message | pool.ha_compute_hypothetical_max_host_failures_to_tolerate | Returns the maximum number of host failures we could tolerate before we would be unable to restart the provided VMs |
Published message | pool.ha_compute_max_host_failures_to_tolerate | Returns the maximum number of host failures we could tolerate before we would be unable to restart configured VMs |
Published message | pool.ha_compute_vm_failover_plan | Return a VM failover plan assuming a given subset of hosts fail |
Published message | pool.ha_failover_plan_exists | Returns true if a VM failover plan exists for up to 'n' host failures |
Published message | pool.set_ha_host_failures_to_tolerate | Set the maximum number of host failures to consider in the HA VM restart planner |
Removed field | VM_guest_metrics.disks | No data |
XenServer 4.1.1
XenServer 4.1.1
Code name: "symc".Changes
Change | Element | Description |
---|---|---|
Published message | SR.update | Refresh the fields on the SR object |
Published message | VDI.update | Ask the storage backend to refresh the fields in the VDI object |
XenServer 4.1
XenServer 4.1
Code name: "miami".Changes
Change | Element | Description |
---|---|---|
Published class | Bond | A Network bond that combines physical network interfaces, also known as link aggregation |
Published class | VLAN | A VLAN mux/demux |
Published class | pool_patch | Pool-wide patches |
Published field | Bond.master | The bonded interface |
Published field | Bond.other_config | additional configuration |
Published field | Bond.slaves | The interfaces which are part of this bond |
Published field | PBD.other_config | additional configuration |
Published field | PIF.DNS | Comma separated list of the IP addresses of the DNS servers to use |
Published field | PIF.IP | IP address |
Published field | PIF.VLAN_master_of | Indicates which VLAN this interface receives untagged traffic from |
Published field | PIF.VLAN_slave_of | Indicates which VLANs this interface transmits tagged traffic to |
Published field | PIF.bond_master_of | Indicates this PIF represents the results of a bond |
Published field | PIF.bond_slave_of | Indicates which bond this interface is part of |
Published field | PIF.currently_attached | true if this interface is online |
Published field | PIF.gateway | IP gateway |
Published field | PIF.ip_configuration_mode | Sets if and how this interface gets an IP address |
Published field | PIF.management | Indicates whether the control software is listening for connections on this interface |
Published field | PIF.netmask | IP netmask |
Published field | PIF.other_config | Additional configuration |
Published field | PIF.physical | true if this represents a physical network interface |
Published field | SM.capabilities | capabilities of the SM plugin |
Published field | SM.other_config | additional configuration |
Published field | SR.sm_config | SM dependent data |
Published field | VBD.unpluggable | true if this VBD will support hot-unplug |
Published field | VDI.location | location information |
Published field | VDI.sm_config | SM dependent data |
Published field | VDI.xenstore_data | data to be inserted into the xenstore tree (/local/domain/0/backend/vbd/<domid>/<device-id>/sm-data) after the VDI is attached. This is generally set by the SM backends on vdi_attach. |
Published field | VLAN.other_config | additional configuration |
Published field | VLAN.tag | VLAN tag in use |
Published field | VLAN.tagged_PIF | interface on which traffic is tagged |
Published field | VLAN.untagged_PIF | interface on which traffic is untagged |
Published field | VM.HVM_shadow_multiplier | multiplier applied to the amount of shadow that will be made available to the guest |
Published field | VM.last_booted_record | Marshalled value containing VM record at time of last boot, updated dynamically to reflect the runtime state of the domain |
Published field | VM.xenstore_data | data to be inserted into the xenstore tree (/local/domain/<domid>/vm-data) after the VM is created. |
Published field | crashdump.other_config | additional configuration |
Published field | host_crashdump.other_config | additional configuration |
Published field | host_patch.other_config | additional configuration |
Published field | host_patch.pool_patch | The patch applied |
Published field | pool_patch.after_apply_guidance | What the client should do after this patch has been applied. |
Published field | pool_patch.host_patches | This hosts this patch is applied to. |
Published field | pool_patch.other_config | additional configuration |
Published field | pool_patch.pool_applied | This patch should be applied across the entire pool |
Published field | pool_patch.size | Size of the patch |
Published field | pool_patch.version | Patch version number |
Published field | session.other_config | additional configuration |
Published field | task.other_config | additional configuration |
Published message | Bond.create | Create an interface bond |
Published message | Bond.destroy | Destroy an interface bond |
Published message | PBD.set_device_config | Sets the PBD's device_config field |
Published message | PIF.forget | Destroy the PIF object matching a particular network interface |
Published message | PIF.introduce | Create a PIF object matching a particular network interface |
Published message | PIF.plug | Attempt to bring up a physical interface |
Published message | PIF.reconfigure_ip | Reconfigure the IP address settings for this interface |
Published message | PIF.scan | Scan for physical interfaces on a host and create PIF objects to represent them |
Published message | PIF.unplug | Attempt to bring down a physical interface |
Published message | SR.probe | Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config. |
Published message | SR.set_physical_size | Sets the SR's physical_size field |
Published message | VDI.introduce | Create a new VDI record in the database only |
Published message | VLAN.create | Create a VLAN mux/demuxer |
Published message | VLAN.destroy | Destroy a VLAN mux/demuxer |
Published message | VM.maximise_memory | Returns the maximum amount of guest memory which will fit, together with overheads, in the supplied amount of physical memory. If 'exact' is true then an exact calculation is performed using the VM's current settings. If 'exact' is false then a more conservative approximation is used |
Published message | host.assert_can_evacuate | Check this host can be evacuated. |
Published message | host.evacuate | Migrate all VMs off of this host, where possible. |
Published message | host.get_system_status_capabilities | |
Published message | host.local_management_reconfigure | Reconfigure the management network interface. Should only be used if Host.management_reconfigure is impossible because the network configuration is broken. |
Published message | host.management_disable | Disable the management network interface |
Published message | host.management_reconfigure | Reconfigure the management network interface |
Published message | host.set_hostname_live | Sets the host name to the specified string. Both the API and lower-level system hostname are changed immediately. |
Published message | host.syslog_reconfigure | Re-configure syslog logging |
Published message | pool.designate_new_master | Perform an orderly handover of the role of master to the referenced host. |
Published message | pool.disable_ha | Turn off High Availability mode |
Published message | pool.enable_ha | Turn on High Availability mode |
Published message | pool_patch.apply | Apply the selected patch to a host and return its output |
Published message | pool_patch.clean | Removes the patch's files from the server |
Published message | pool_patch.destroy | Removes the patch's files from all hosts in the pool, and removes the database entries. Only works on unapplied patches. |
Published message | pool_patch.pool_apply | Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output |
Published message | pool_patch.precheck | Execute the precheck stage of the selected patch on a host and return its output |
Published message | session.local_logout | Log out of local session. |
Published message | session.slave_local_login_with_password | Authenticate locally against a slave in emergency mode. Note the resulting sessions are only good for use on this host. |
Deprecated message | PIF.create_VLAN | Replaced by VLAN.create |
Deprecated message | PIF.destroy | Replaced by VLAN.destroy and Bond.destroy |
Deprecated message | SR.make | Use SR.create instead |
Deprecated message | host_patch.apply | |
Deprecated message | host_patch.destroy |
XenServer 4.0
XenServer 4.0
Code name: "rio".Changes
Change | Element | Description |
---|---|---|
Published class | PBD | The physical block devices through which hosts access SRs |
Published class | PIF | A physical network interface (note separate VLANs are represented as several PIFs) |
Published class | PIF_metrics | The metrics associated with a physical network interface |
Published class | SM | A storage manager plugin |
Published class | SR | A storage repository |
Published class | VBD | A virtual block device |
Published class | VBD_metrics | The metrics associated with a virtual block device |
Published class | VDI | A virtual disk image |
Published class | VIF | A virtual network interface |
Published class | VIF_metrics | The metrics associated with a virtual network device |
Published class | VM | A virtual machine (or 'guest'). |
Published class | VM_guest_metrics | The metrics reported by the guest (as opposed to inferred from outside) |
Published class | VM_metrics | The metrics associated with a VM |
Published class | console | A console |
Published class | crashdump | A VM crashdump |
Published class | event | Asynchronous event registration and handling |
Published class | host | A physical host |
Published class | host_cpu | A physical CPU |
Published class | host_crashdump | Represents a host crash dump |
Published class | host_metrics | The metrics associated with a host |
Published class | host_patch | Represents a patch stored on a server |
Published class | network | A virtual network |
Published class | pool | Pool-wide information |
Published class | session | A session |
Published class | task | A long-running asynchronous task |
Published class | user | A user of the system |
Published field | Bond.uuid | Unique identifier/object reference |
Published field | Cluster.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | Cluster.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | Cluster_host.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | Cluster_host.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | DR_task.introduced_SRs | All SRs introduced by this appliance |
Published field | DR_task.uuid | Unique identifier/object reference |
Published field | Feature.name_description | a notes field containing human-readable description |
Published field | Feature.name_label | a human-readable name |
Published field | LVHD.uuid | Unique identifier/object reference |
Published field | Observer.name_description | a notes field containing human-readable description |
Published field | Observer.name_label | a human-readable name |
Published field | PBD.SR | the storage repository that the pbd realises |
Published field | PBD.currently_attached | is the SR currently attached on this host? |
Published field | PBD.device_config | a config string to string map that is provided to the host's SR-backend-driver |
Published field | PBD.host | physical machine on which the pbd is available |
Published field | PBD.uuid | Unique identifier/object reference |
Published field | PIF.MAC | ethernet MAC address of physical interface |
Published field | PIF.MTU | MTU in octets |
Published field | PIF.VLAN | VLAN tag for all traffic passing through this interface |
Published field | PIF.device | machine-readable name of the interface (e.g. eth0) |
Published field | PIF.host | physical machine to which this pif is connected |
Published field | PIF.metrics | metrics associated with this PIF |
Published field | PIF.network | virtual network to which this pif is connected |
Published field | PIF.uuid | Unique identifier/object reference |
Published field | PIF_metrics.carrier | Report if the PIF got a carrier or not |
Published field | PIF_metrics.device_id | Report device ID |
Published field | PIF_metrics.device_name | Report device name |
Published field | PIF_metrics.duplex | Full duplex capability of the link (if available) |
Published field | PIF_metrics.io_read_kbs | Read bandwidth (KiB/s) |
Published field | PIF_metrics.io_write_kbs | Write bandwidth (KiB/s) |
Published field | PIF_metrics.last_updated | Time at which this information was last updated |
Published field | PIF_metrics.pci_bus_path | PCI bus path of the pif (if available) |
Published field | PIF_metrics.speed | Speed of the link in Mbit/s (if available) |
Published field | PIF_metrics.uuid | Unique identifier/object reference |
Published field | PIF_metrics.vendor_id | Report vendor ID |
Published field | PIF_metrics.vendor_name | Report vendor name |
Published field | Repository.name_description | a notes field containing human-readable description |
Published field | Repository.name_label | a human-readable name |
Published field | SM.configuration | names and descriptions of device config keys |
Published field | SM.copyright | Entity which owns the copyright of this plugin |
Published field | SM.name_description | a notes field containing human-readable description |
Published field | SM.name_label | a human-readable name |
Published field | SM.required_api_version | Minimum SM API version required on the server |
Published field | SM.type | SR.type |
Published field | SM.uuid | Unique identifier/object reference |
Published field | SM.vendor | Vendor who created this plugin |
Published field | SM.version | Version of the plugin |
Published field | SR.PBDs | describes how particular hosts can see this storage repository |
Published field | SR.VDIs | all virtual disks known to this storage repository |
Published field | SR.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | SR.content_type | the type of the SR's content, if required (e.g. ISOs) |
Published field | SR.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | SR.name_description | a notes field containing human-readable description |
Published field | SR.name_label | a human-readable name |
Published field | SR.other_config | additional configuration |
Published field | SR.physical_size | total physical size of the repository (in bytes) |
Published field | SR.physical_utilisation | physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical_utilisation may be less than virtual_allocation |
Published field | SR.shared | true if this SR is (capable of being) shared between multiple hosts |
Published field | SR.type | type of the storage repository |
Published field | SR.uuid | Unique identifier/object reference |
Published field | SR.virtual_allocation | sum of virtual_sizes of all VDIs in this storage repository (in bytes) |
Published field | VBD.VDI | the virtual disk |
Published field | VBD.VM | the virtual machine |
Published field | VBD.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VBD.bootable | true if this VBD is bootable |
Published field | VBD.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VBD.currently_attached | is the device currently attached (erased on reboot) |
Published field | VBD.device | device seen by the guest e.g. hda1 |
Published field | VBD.empty | if true this represents an empty drive |
Published field | VBD.metrics | metrics associated with this VBD |
Published field | VBD.mode | the mode the VBD should be mounted with |
Published field | VBD.other_config | additional configuration |
Published field | VBD.qos_algorithm_params | parameters for chosen QoS algorithm |
Published field | VBD.qos_algorithm_type | QoS algorithm to use |
Published field | VBD.qos_supported_algorithms | supported QoS algorithms for this VBD |
Published field | VBD.runtime_properties | Device runtime properties |
Published field | VBD.status_code | error/success code associated with last attach-operation (erased on reboot) |
Published field | VBD.status_detail | error/success information associated with last attach-operation status (erased on reboot) |
Published field | VBD.storage_lock | true if a storage level lock was acquired |
Published field | VBD.type | how the VBD will appear to the guest (e.g. disk or CD) |
Published field | VBD.userdevice | user-friendly device name e.g. 0,1,2,etc. |
Published field | VBD.uuid | Unique identifier/object reference |
Published field | VBD_metrics.io_read_kbs | Read bandwidth (KiB/s) |
Published field | VBD_metrics.io_write_kbs | Write bandwidth (KiB/s) |
Published field | VBD_metrics.last_updated | Time at which this information was last updated |
Published field | VBD_metrics.uuid | Unique identifier/object reference |
Published field | VDI.SR | storage repository in which the VDI resides |
Published field | VDI.VBDs | list of vbds that refer to this disk |
Published field | VDI.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VDI.crash_dumps | list of crash dumps that refer to this disk |
Published field | VDI.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VDI.managed | |
Published field | VDI.missing | true if SR scan operation reported this VDI as not present on disk |
Published field | VDI.name_description | a notes field containing human-readable description |
Published field | VDI.name_label | a human-readable name |
Published field | VDI.other_config | additional configuration |
Published field | VDI.parent | This field is always null. Deprecated |
Published field | VDI.physical_utilisation | amount of physical space that the disk image is currently taking up on the storage repository (in bytes) |
Published field | VDI.read_only | true if this disk may ONLY be mounted read-only |
Published field | VDI.sharable | true if this disk may be shared |
Published field | VDI.storage_lock | true if this disk is locked at the storage level |
Published field | VDI.type | type of the VDI |
Published field | VDI.uuid | Unique identifier/object reference |
Published field | VDI.virtual_size | size of disk as presented to the guest (in bytes). Note that, depending on storage backend type, requested size may not be respected exactly |
Published field | VIF.MAC | ethernet MAC address of virtual interface, as exposed to guest |
Published field | VIF.MTU | MTU in octets |
Published field | VIF.VM | virtual machine to which this vif is connected |
Published field | VIF.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VIF.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VIF.currently_attached | is the device currently attached (erased on reboot) |
Published field | VIF.device | order in which VIF backends are created by xapi |
Published field | VIF.metrics | metrics associated with this VIF |
Published field | VIF.network | virtual network to which this vif is connected |
Published field | VIF.other_config | additional configuration |
Published field | VIF.qos_algorithm_params | parameters for chosen QoS algorithm |
Published field | VIF.qos_algorithm_type | QoS algorithm to use |
Published field | VIF.qos_supported_algorithms | supported QoS algorithms for this VIF |
Published field | VIF.runtime_properties | Device runtime properties |
Published field | VIF.status_code | error/success code associated with last attach-operation (erased on reboot) |
Published field | VIF.status_detail | error/success information associated with last attach-operation status (erased on reboot) |
Published field | VIF.uuid | Unique identifier/object reference |
Published field | VIF_metrics.io_read_kbs | Read bandwidth (KiB/s) |
Published field | VIF_metrics.io_write_kbs | Write bandwidth (KiB/s) |
Published field | VIF_metrics.last_updated | Time at which this information was last updated |
Published field | VIF_metrics.uuid | Unique identifier/object reference |
Published field | VLAN.uuid | Unique identifier/object reference |
Published field | VM.HVM_boot_params | HVM boot params |
Published field | VM.HVM_boot_policy | HVM boot policy |
Published field | VM.PCI_bus | PCI bus path for pass-through devices |
Published field | VM.PV_args | kernel command-line arguments |
Published field | VM.PV_bootloader | name of or path to bootloader |
Published field | VM.PV_bootloader_args | miscellaneous arguments for the bootloader |
Published field | VM.PV_kernel | path to the kernel |
Published field | VM.PV_legacy_args | to make Zurich guests boot |
Published field | VM.PV_ramdisk | path to the initrd |
Published field | VM.VBDs | virtual block devices |
Published field | VM.VCPUs_at_startup | Boot number of VCPUs |
Published field | VM.VCPUs_max | Max number of VCPUs |
Published field | VM.VCPUs_params | configuration parameters for the selected VCPU policy |
Published field | VM.VIFs | virtual network interfaces |
Published field | VM.VTPMs | virtual TPMs |
Published field | VM.VUSBs | virtual usb devices |
Published field | VM.actions_after_crash | action to take if the guest crashes |
Published field | VM.actions_after_reboot | action to take after the guest has rebooted itself |
Published field | VM.actions_after_shutdown | action to take after the guest has shutdown itself |
Published field | VM.affinity | A host which the VM has some affinity for (or NULL). This is used as a hint to the start call when it decides where to run the VM. Resource constraints may cause the VM to be started elsewhere. |
Published field | VM.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VM.appliance | the appliance to which this VM belongs |
Published field | VM.consoles | virtual console devices |
Published field | VM.crash_dumps | crash dumps associated with this VM |
Published field | VM.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VM.domarch | Domain architecture (if available, null string otherwise) |
Published field | VM.domid | domain ID (if available, -1 otherwise) |
Published field | VM.guest_metrics | metrics associated with the running guest |
Published field | VM.is_a_template | true if this is a template. Template VMs can never be started, they are used only for cloning other VMs |
Published field | VM.is_control_domain | true if this is a control domain (domain 0 or a driver domain) |
Published field | VM.last_boot_CPU_flags | describes the CPU flags on which the VM was last booted |
Published field | VM.memory_dynamic_max | Dynamic maximum (bytes) |
Published field | VM.memory_dynamic_min | Dynamic minimum (bytes) |
Published field | VM.memory_overhead | Virtualization memory overhead (bytes). |
Published field | VM.memory_static_max | Statically-set (i.e. absolute) maximum (bytes). The value of this field at VM start time acts as a hard limit of the amount of memory a guest can use. New values only take effect on reboot. |
Published field | VM.memory_static_min | Statically-set (i.e. absolute) mininum (bytes). The value of this field indicates the least amount of memory this VM can boot with without crashing. |
Published field | VM.memory_target | Dynamically-set memory target (bytes). The value of this field indicates the current target for memory available to this VM. |
Published field | VM.metrics | metrics associated with this VM |
Published field | VM.name_description | a notes field containing human-readable description |
Published field | VM.name_label | a human-readable name |
Published field | VM.other_config | additional configuration |
Published field | VM.platform | platform-specific configuration |
Published field | VM.power_state | Current power state of the machine |
Published field | VM.recommendations | An XML specification of recommended values and ranges for properties of this VM |
Published field | VM.resident_on | the host the VM is currently resident on |
Published field | VM.scheduled_to_be_resident_on | the host on which the VM is due to be started/resumed/migrated. This acts as a memory reservation indicator |
Published field | VM.suspend_VDI | The VDI that a suspend image is stored on. (Only has meaning if VM is currently suspended) |
Published field | VM.user_version | Creators of VMs and templates may store version information here. |
Published field | VM.uuid | Unique identifier/object reference |
Published field | VMPP.name_description | a notes field containing human-readable description |
Published field | VMPP.name_label | a human-readable name |
Published field | VMSS.VMs | all VMs attached to this snapshot schedule |
Published field | VMSS.enabled | enable or disable this snapshot schedule |
Published field | VMSS.frequency | frequency of taking snapshot from snapshot schedule |
Published field | VMSS.last_run_time | time of the last snapshot |
Published field | VMSS.name_description | a notes field containing human-readable description |
Published field | VMSS.name_label | a human-readable name |
Published field | VMSS.retained_snapshots | maximum number of snapshots that should be stored at any time |
Published field | VMSS.schedule | schedule of the snapshot containing 'hour', 'min', 'days'. Date/time-related information is in Local Timezone |
Published field | VMSS.type | type of the snapshot schedule |
Published field | VMSS.uuid | Unique identifier/object reference |
Published field | VM_appliance.VMs | all VMs in this appliance |
Published field | VM_appliance.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VM_appliance.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VM_appliance.name_description | a notes field containing human-readable description |
Published field | VM_appliance.name_label | a human-readable name |
Published field | VM_appliance.uuid | Unique identifier/object reference |
Published field | VM_guest_metrics.PV_drivers_up_to_date | true if the PV drivers appear to be up to date |
Published field | VM_guest_metrics.PV_drivers_version | version of the PV drivers |
Published field | VM_guest_metrics.disks | Disk configuration/free space |
Published field | VM_guest_metrics.last_updated | Time at which this information was last updated |
Published field | VM_guest_metrics.memory | free/used/total |
Published field | VM_guest_metrics.networks | network configuration |
Published field | VM_guest_metrics.os_version | version of the OS |
Published field | VM_guest_metrics.other | anything else |
Published field | VM_guest_metrics.uuid | Unique identifier/object reference |
Published field | VM_metrics.VCPUs_CPU | VCPU to PCPU map |
Published field | VM_metrics.VCPUs_flags | CPU flags (blocked,online,running) |
Published field | VM_metrics.VCPUs_number | Current number of VCPUs |
Published field | VM_metrics.VCPUs_params | The live equivalent to VM.VCPUs_params |
Published field | VM_metrics.VCPUs_utilisation | Utilisation for all of guest's current VCPUs |
Published field | VM_metrics.install_time | Time at which the VM was installed |
Published field | VM_metrics.last_updated | Time at which this information was last updated |
Published field | VM_metrics.memory_actual | Guest's actual memory (bytes) |
Published field | VM_metrics.start_time | Time at which this VM was last booted |
Published field | VM_metrics.state | The state of the guest, eg blocked, dying etc |
Published field | VM_metrics.uuid | Unique identifier/object reference |
Published field | VTPM.VM | The virtual machine the TPM is attached to |
Published field | VTPM.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VTPM.backend | The domain where the backend is located (unused) |
Published field | VTPM.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VTPM.uuid | Unique identifier/object reference |
Published field | VUSB.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | VUSB.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | VUSB.currently_attached | is the device currently attached |
Published field | blob.last_updated | Time at which the data in the blob was last updated |
Published field | blob.mime_type | The mime type associated with this object. Defaults to 'application/octet-stream' if the empty string is supplied |
Published field | blob.name_description | a notes field containing human-readable description |
Published field | blob.name_label | a human-readable name |
Published field | blob.size | Size of the binary data, in bytes |
Published field | blob.uuid | Unique identifier/object reference |
Published field | console.VM | VM to which this console is attached |
Published field | console.location | URI for the console service |
Published field | console.other_config | additional configuration |
Published field | console.protocol | the protocol used by this console |
Published field | console.uuid | Unique identifier/object reference |
Published field | crashdump.VDI | the virtual disk |
Published field | crashdump.VM | the virtual machine |
Published field | crashdump.uuid | Unique identifier/object reference |
Published field | data_source.enabled | true if the data source is being logged |
Published field | data_source.max | the maximum value of the data source |
Published field | data_source.min | the minimum value of the data source |
Published field | data_source.name_description | a notes field containing human-readable description |
Published field | data_source.name_label | a human-readable name |
Published field | data_source.standard | true if the data source is enabled by default. Non-default data sources cannot be disabled |
Published field | data_source.units | the units of the value |
Published field | data_source.value | current value of the data source |
Published field | event.class | The name of the class of the object that changed |
Published field | event.id | An ID, monotonically increasing, and local to the current session |
Published field | event.obj_uuid | The uuid of the object that changed |
Published field | event.operation | The operation that was performed |
Published field | event.ref | A reference to the object that changed |
Published field | event.timestamp | The time at which the event occurred |
Published field | host.API_version_major | major version number |
Published field | host.API_version_minor | minor version number |
Published field | host.API_version_vendor | identification of vendor |
Published field | host.API_version_vendor_implementation | details of vendor implementation |
Published field | host.PBDs | physical blockdevices |
Published field | host.PIFs | physical network interfaces |
Published field | host.address | The address by which this host can be contacted from any other host in the pool |
Published field | host.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | host.capabilities | Xen capabilities |
Published field | host.cpu_configuration | The CPU configuration on this host. May contain keys such as "nr_nodes", "sockets_per_node", "cores_per_socket", or "threads_per_core" |
Published field | host.crash_dump_sr | The SR in which VDIs for crash dumps are created |
Published field | host.crashdumps | Set of host crash dumps |
Published field | host.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | host.enabled | True if the host is currently enabled |
Published field | host.host_CPUs | The physical CPUs on this host |
Published field | host.hostname | The hostname of this host |
Published field | host.license_params | State of the current license |
Published field | host.logging | logging configuration |
Published field | host.memory_overhead | Virtualization memory overhead (bytes). |
Published field | host.metrics | metrics associated with this host |
Published field | host.name_description | a notes field containing human-readable description |
Published field | host.name_label | a human-readable name |
Published field | host.other_config | additional configuration |
Published field | host.patches | Set of host patches |
Published field | host.resident_VMs | list of VMs currently resident on host |
Published field | host.sched_policy | Scheduler policy currently in force on this host |
Published field | host.software_version | version strings |
Published field | host.supported_bootloaders | a list of the bootloaders installed on the machine |
Published field | host.suspend_image_sr | The SR in which VDIs for suspend images are created |
Published field | host.uuid | Unique identifier/object reference |
Published field | host_cpu.family | the family (number) of the physical CPU |
Published field | host_cpu.features | the physical CPU feature bitmap |
Published field | host_cpu.flags | the flags of the physical CPU (a decoded version of the features field) |
Published field | host_cpu.host | the host the CPU is in |
Published field | host_cpu.model | the model number of the physical CPU |
Published field | host_cpu.modelname | the model name of the physical CPU |
Published field | host_cpu.number | the number of the physical CPU within the host |
Published field | host_cpu.speed | the speed of the physical CPU |
Published field | host_cpu.stepping | the stepping of the physical CPU |
Published field | host_cpu.utilisation | the current CPU utilisation |
Published field | host_cpu.uuid | Unique identifier/object reference |
Published field | host_cpu.vendor | the vendor of the physical CPU |
Published field | host_crashdump.host | Host the crashdump relates to |
Published field | host_crashdump.size | Size of the crashdump |
Published field | host_crashdump.timestamp | Time the crash happened |
Published field | host_crashdump.uuid | Unique identifier/object reference |
Published field | host_metrics.last_updated | Time at which this information was last updated |
Published field | host_metrics.live | Pool master thinks this host is live |
Published field | host_metrics.memory_free | Free host memory (bytes) |
Published field | host_metrics.memory_total | Total host memory (bytes) |
Published field | host_metrics.uuid | Unique identifier/object reference |
Published field | host_patch.applied | True if the patch has been applied |
Published field | host_patch.host | Host the patch relates to |
Published field | host_patch.name_description | a notes field containing human-readable description |
Published field | host_patch.name_label | a human-readable name |
Published field | host_patch.size | Size of the patch |
Published field | host_patch.timestamp_applied | Time the patch was applied |
Published field | host_patch.uuid | Unique identifier/object reference |
Published field | host_patch.version | Patch version number |
Published field | message.body | The body of the message |
Published field | message.name | The name of the message |
Published field | message.obj_uuid | The uuid of the object this message is associated with |
Published field | message.priority | The message priority, 0 being low priority |
Published field | message.timestamp | The time at which the message was created |
Published field | message.uuid | Unique identifier/object reference |
Published field | network.PIFs | list of connected pifs |
Published field | network.VIFs | list of connected vifs |
Published field | network.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | network.bridge | name of the bridge corresponding to this network on the local host |
Published field | network.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | network.name_description | a notes field containing human-readable description |
Published field | network.name_label | a human-readable name |
Published field | network.other_config | additional configuration |
Published field | network.uuid | Unique identifier/object reference |
Published field | network_sriov.uuid | Unique identifier/object reference |
Published field | pool.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | pool.coordinator_bias | true if bias against pool master when scheduling vms is enabled, false otherwise |
Published field | pool.crash_dump_SR | The SR in which VDIs for crash dumps are created |
Published field | pool.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | pool.default_SR | Default SR for VDIs |
Published field | pool.master | The host that is pool master |
Published field | pool.name_description | Description |
Published field | pool.name_label | Short name |
Published field | pool.other_config | additional configuration |
Published field | pool.suspend_image_SR | The SR in which VDIs for suspend images are created |
Published field | pool.uuid | Unique identifier/object reference |
Published field | pool_patch.name_description | a notes field containing human-readable description |
Published field | pool_patch.name_label | a human-readable name |
Published field | pool_patch.uuid | Unique identifier/object reference |
Published field | pool_update.name_description | a notes field containing human-readable description |
Published field | pool_update.name_label | a human-readable name |
Published field | pool_update.uuid | Unique identifier/object reference |
Published field | pool_update.vdi | VDI the update was uploaded to |
Published field | role.uuid | Unique identifier/object reference |
Published field | secret.other_config | other_config |
Published field | secret.uuid | Unique identifier/object reference |
Published field | secret.value | the secret |
Published field | session.last_active | Timestamp for last time session was active |
Published field | session.pool | True if this session relates to a intra-pool login, false otherwise |
Published field | session.this_host | Currently connected host |
Published field | session.this_user | Currently connected user |
Published field | session.uuid | Unique identifier/object reference |
Published field | subject.uuid | Unique identifier/object reference |
Published field | task.allowed_operations | list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client. |
Published field | task.created | Time task was created |
Published field | task.current_operations | links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task. |
Published field | task.error_info | if the task has failed, this field contains the set of associated error strings. Undefined otherwise. |
Published field | task.finished | Time task finished (i.e. succeeded or failed). If task-status is pending, then the value of this field has no meaning |
Published field | task.name_description | a notes field containing human-readable description |
Published field | task.name_label | a human-readable name |
Published field | task.progress | This field contains the estimated fraction of the task which is complete. This field should not be used to determine whether the task is complete - for this the status field of the task should be used. |
Published field | task.resident_on | the host on which the task is running |
Published field | task.result | if the task has completed successfully, this field contains the result value (either Void or an object reference). Undefined otherwise. |
Published field | task.status | current status of the task |
Published field | task.type | if the task has completed successfully, this field contains the type of the encoded result (i.e. name of the class whose reference is in the result field). Undefined otherwise. |
Published field | task.uuid | Unique identifier/object reference |
Published field | user.fullname | full name |
Published field | user.short_name | short name (e.g. userid) |
Published field | user.uuid | Unique identifier/object reference |
Published message | PBD.plug | Activate the specified PBD, causing the referenced SR to be attached and scanned |
Published message | PBD.unplug | Deactivate the specified PBD, causing the referenced SR to be detached and nolonger scanned |
Published message | PIF.create_VLAN | Create a VLAN interface from an existing physical interface |
Published message | PIF.destroy | Destroy the PIF object (provided it is a VLAN interface) |
Published message | SR.create | Create a new Storage Repository and introduce it into the managed system, creating both SR record and PBD record to attach it to current host (with specified device_config parameters) |
Published message | SR.destroy | Destroy specified SR, removing SR-record from database and remove SR from disk. (In order to affect this operation the appropriate device_config is read from the specified SR's PBD on current host) |
Published message | SR.forget | Removing specified SR-record from database, without attempting to remove SR from disk |
Published message | SR.get_supported_types | Return a set of all the SR types supported by the system |
Published message | SR.introduce | Introduce a new Storage Repository into the managed system |
Published message | SR.make | Create a new Storage Repository on disk |
Published message | SR.scan | Refreshes the list of VDIs associated with an SR |
Published message | SR.set_name_description | Set the name description of the SR |
Published message | SR.set_name_label | Set the name label of the SR |
Published message | SR.set_shared | Sets the shared flag on the SR |
Published message | VBD.assert_attachable | Throws an error if this VBD could not be attached to this VM if the VM were running. Intended for debugging. |
Published message | VBD.eject | Remove the media from the device and leave it empty |
Published message | VBD.insert | Insert new media into the device |
Published message | VBD.plug | Hotplug the specified VBD, dynamically attaching it to the running VM |
Published message | VBD.set_mode | Sets the mode of the VBD. The power_state of the VM must be halted. |
Published message | VBD.unplug | Hot-unplug the specified VBD, dynamically unattaching it from the running VM |
Published message | VBD.unplug_force | Forcibly unplug the specified VBD |
Published message | VDI.clone | Take an exact copy of the VDI and return a reference to the new disk. If any driver_params are specified then these are passed through to the storage-specific substrate driver that implements the clone operation. NB the clone lives in the same Storage Repository as its parent. |
Published message | VDI.copy | Copies a VDI to an SR. There must be a host that can see both the source and destination SRs simultaneously |
Published message | VDI.forget | Removes a VDI record from the database |
Published message | VDI.resize | Resize the VDI. |
Published message | VDI.resize_online | Resize the VDI which may or may not be attached to running guests. |
Published message | VDI.set_name_description | Set the name description of the VDI. This can only happen when its SR is currently attached. |
Published message | VDI.set_name_label | Set the name label of the VDI. This can only happen when then its SR is currently attached. |
Published message | VDI.set_read_only | Sets the VDI's read_only field |
Published message | VDI.snapshot | Take a read-only snapshot of the VDI, returning a reference to the snapshot. If any driver_params are specified then these are passed through to the storage-specific substrate driver that takes the snapshot. NB the snapshot lives in the same Storage Repository as its parent. |
Published message | VIF.plug | Hotplug the specified VIF, dynamically attaching it to the running VM |
Published message | VIF.unplug | Hot-unplug the specified VIF, dynamically unattaching it from the running VM |
Published message | VM.add_to_VCPUs_params_live | Add the given key-value pair to VM.VCPUs_params, and apply that value on the running VM |
Published message | VM.assert_can_boot_here | Returns an error if the VM could not boot on this host for some reason |
Published message | VM.assert_operation_valid | Check to see whether this operation is acceptable in the current state of the system, raising an error if the operation is invalid for some reason |
Published message | VM.clean_reboot | Attempt to cleanly shutdown the specified VM (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state. |
Published message | VM.clean_shutdown | Attempt to cleanly shutdown the specified VM. (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state. |
Published message | VM.clone | Clones the specified VM, making a new VM. Clone automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write). This function can only be called when the VM is in the Halted State. |
Published message | VM.copy | Copies a VM to an SR. There must be a host that can see both the source and destination SRs simultaneously |
Published message | VM.get_allowed_VBD_devices | Returns a list of the allowed values that a VBD device field can take |
Published message | VM.get_allowed_VIF_devices | Returns a list of the allowed values that a VIF device field can take |
Published message | VM.get_boot_record | Returns a record describing the VM's dynamic state, initialised when the VM boots and updated to reflect runtime configuration changes e.g. CPU hotplug |
Published message | VM.get_possible_hosts | Return the list of hosts on which this VM may run. |
Published message | VM.hard_reboot | Stop executing the specified VM without attempting a clean shutdown and immediately restart the VM. |
Published message | VM.hard_shutdown | Stop executing the specified VM without attempting a clean shutdown. |
Published message | VM.pause | Pause the specified VM. This can only be called when the specified VM is in the Running state. |
Published message | VM.pool_migrate | Migrate a VM to another Host. |
Published message | VM.power_state_reset | Reset the power-state of the VM to halted in the database only. (Used to recover from slave failures in pooling scenarios by resetting the power-states of VMs running on dead slaves to halted.) This is a potentially dangerous operation; use with care. |
Published message | VM.provision | Inspects the disk configuration contained within the VM's other_config, creates VDIs and VBDs and then executes any applicable post-install script. |
Published message | VM.resume | Awaken the specified VM and resume it. This can only be called when the specified VM is in the Suspended state. |
Published message | VM.resume_on | Awaken the specified VM and resume it on a particular Host. This can only be called when the specified VM is in the Suspended state. |
Published message | VM.send_sysrq | Send the given key as a sysrq to this VM. The key is specified as a single character (a String of length 1). This can only be called when the specified VM is in the Running state. |
Published message | VM.send_trigger | Send the named trigger to this VM. This can only be called when the specified VM is in the Running state. |
Published message | VM.set_HVM_boot_policy | Set the VM.HVM_boot_policy field of the given VM, which will take effect when it is next started |
Published message | VM.set_VCPUs_number_live | Set the number of VCPUs for a running VM |
Published message | VM.set_actions_after_crash | Sets the actions_after_crash parameter |
Published message | VM.set_memory_target_live | Set the memory target for a running VM |
Published message | VM.set_shadow_multiplier_live | Set the shadow memory multiplier on a running VM |
Published message | VM.start | Start the specified VM. This function can only be called with the VM is in the Halted State. |
Published message | VM.start_on | Start the specified VM on a particular host. This function can only be called with the VM is in the Halted State. |
Published message | VM.suspend | Suspend the specified VM to disk. This can only be called when the specified VM is in the Running state. |
Published message | VM.unpause | Resume the specified VM. This can only be called when the specified VM is in the Paused state. |
Published message | VM.update_allowed_operations | Recomputes the list of acceptable operations |
Published message | crashdump.destroy | Destroy the specified crashdump |
Published message | event.get_current_id | Return the ID of the next event to be generated by the system |
Published message | event.next | Blocking call which returns a (possibly empty) batch of events. This method is only recommended for legacy use. New development should use event.from which supersedes this method. |
Published message | event.register | Registers this session with the event system for a set of given classes. This method is only recommended for legacy use in conjunction with event.next. |
Published message | event.unregister | Removes this session's registration with the event system for a set of given classes. This method is only recommended for legacy use in conjunction with event.next. |
Published message | host.bugreport_upload | Run xen-bugtool --yestoall and upload the output to support |
Published message | host.destroy | Destroy specified host record in database |
Published message | host.disable | Puts the host into a state in which no new VMs can be started. Currently active VMs on the host continue to execute. |
Published message | host.dmesg | Get the host xen dmesg. |
Published message | host.dmesg_clear | Get the host xen dmesg, and clear the buffer. |
Published message | host.enable | Puts the host into a state in which new VMs can be started. |
Published message | host.get_log | Get the host's log file |
Published message | host.license_apply | Apply a new license to a host |
Published message | host.list_methods | List all supported methods |
Published message | host.reboot | Reboot the host. (This function can only be called if there are no currently running VMs on the host and it is disabled.) |
Published message | host.restart_agent | Restarts the agent after a 10 second pause. WARNING: this is a dangerous operation. Any operations in progress will be aborted, and unrecoverable data loss may occur. The caller is responsible for ensuring that there are no operations in progress when this method is called. |
Published message | host.send_debug_keys | Inject the given string as debugging keys into Xen |
Published message | host.shutdown | Shutdown the host. (This function can only be called if there are no currently running VMs on the host and it is disabled.) |
Published message | host_crashdump.destroy | Destroy specified host crash dump, removing it from the disk. |
Published message | host_crashdump.upload | Upload the specified host crash dump to a specified URL |
Published message | host_patch.apply | Apply the selected patch and return its output |
Published message | host_patch.destroy | Destroy the specified host patch, removing it from the disk. This does NOT reverse the patch |
Published message | pool.create_VLAN | Create PIFs, mapping a network to the same physical interface/VLAN on each host. This call is deprecated: use Pool.create_VLAN_from_PIF instead. |
Published message | pool.create_VLAN_from_PIF | Create a pool-wide VLAN by taking the PIF. |
Published message | pool.eject | Instruct a pool master to eject a host from the pool |
Published message | pool.emergency_reset_master | Instruct a slave already in a pool that the master has changed |
Published message | pool.emergency_transition_to_master | Instruct host that's currently a slave to transition to being master |
Published message | pool.join | Instruct host to join a new pool |
Published message | pool.join_force | Instruct host to join a new pool |
Published message | pool.recover_slaves | Instruct a pool master, M, to try and contact its slaves and, if slaves are in emergency mode, reset their master address to M. |
Published message | pool.sync_database | Forcibly synchronise the database now |
Published message | session.change_password | Change the account password; if your session is authenticated with root privileges then the old_pwd is validated and the new_pwd is set regardless |
Published message | session.login_with_password | Attempt to authenticate the user, returning a session reference if successful |
Published message | session.logout | Log out of a session |
Published message | task.cancel | Request that a task be cancelled. Note that a task may fail to be cancelled and may complete or fail normally and note that, even when a task does cancel, it might take an arbitrary amount of time. |
Published message | task.create | Create a new task object which must be manually destroyed. |
Published message | task.destroy | Destroy the task object |
Topics
Subsections of Topics
API for configuring the udhcp server in Dom0
This API allows you to configure the DHCP service running on the Host Internal Management Network (HIMN). The API configures a udhcp daemon residing in Dom0 and alters the service configuration for any VM using the network.
It should be noted that for this reason, that callers who modify the default configuration should be aware that their changes may have an adverse effect on other consumers of the HIMN.
Version history
Date State
---- ----
2013-3-15 Stable
Stable: this API is considered stable and unlikely to change between software version and between hotfixes.
API description
The API for configuring the network is based on a series of other_config keys that can be set by the caller on the HIMN XAPI network object. Once any of the keys below have been set, the caller must ensure that any VIFs attached to the HIMN are removed, destroyed, created and plugged.
ip_begin
The first IP address in the desired subnet that the caller wishes the DHCP service to use.
ip_end
The last IP address in the desired subnet that the caller wishes the DHCP service to use.
netmask
The subnet mask for each of the issues IP addresses.
ip_disable_gw
A boolean key for disabling the DHCP server from returning a default gateway for VMs on the network. To disable returning the gateway address set the key to True.
Note: By default, the DHCP server will issue a default gateway for those requesting an address. Setting this key may disrupt applications that require the default gateway for communicating with Dom0 and so should be used with care.
Example code
An example python extract of setting the config for the network:
def get_himn_ref():
networks = session.xenapi.network.get_all_records()
for ref, rec in networks.iteritems():
if 'is_host_internal_management_network' \
in rec['other_config']:
return ref
raise Exception("Error: unable to find HIMN.")
himn_ref = get_himn_ref()
other_config = session.xenapi.network.get_other_config(himn_ref)
other_config['ip_begin'] = "169.254.0.1"
other_config['ip_end'] = "169.254.255.254"
other_config['netmask'] = "255.255.0.0"
session.xenapi.network.set_other_config(himn_ref, other_config)
An example for how to disable the server returning a default gateway:
himn_ref = get_himn_ref()
other_config = session.xenapi.network.get_other_config(himn_ref)
other_config['ip_disable_gw'] = True
session.xenapi.network.set_other_config(himn_ref, other_config)
Guest agents
“Guest agents” are special programs which run inside VMs which can be controlled via the XenAPI.
One communication method between XenAPI clients is via Xenstore.
Adding Xenstore entries to VMs
Developers may wish to install guest agents into VMs which take special action based on the type of the VM. In order to communicate this information into the guest, a special Xenstore name-space known as vm-data
is available which is populated at VM creation time. It is populated from the xenstore-data
map in the VM record.
Set the xenstore-data
parameter in the VM record:
xe vm-param-set uuid= xenstore-data:vm-data/foo=bar
Start the VM.
If it is a Linux-based VM, install the COMPANY_TOOLS and use the xenstore-read
to verify that the node exists in Xenstore.
Note
Only prefixes beginning with
vm-data
are permitted, and anything not in this name-space will be silently ignored when starting the VM.
Memory
Memory is used for many things:
- the hypervisor code: this is the Xen executable itself
- the hypervisor heap: this is needed for per-domain structures and per-vCPU structures
- the crash kernel: this is needed to collect information after a host crash
- domain RAM: this is the memory the VM believes it has
- shadow memory: for HVM guests running on hosts without hardware assisted paging (HAP) Xen uses shadow to optimise page table updates. For all guests shadow is used during live migration for tracking the memory transfer.
- video RAM for the virtual graphics card
Some of these are constants (e.g. hypervisor code) while some depend on the VM configuration (e.g. domain RAM). Xapi calls the constants “host overhead” and the variables due to VM configuration as “VM overhead”. These overheads are subtracted from free memory on the host when starting, resuming and migrating VMs.
Metrics
xcp-rrdd records statistics about the host and the VMs running on top. The metrics are stored persistently for long-term access and analysis of historical trends. Statistics are stored in RRDs (Round Robin Databases). RRDs are fixed-size structures that store time series with decreasing time resolution: the older the data point is, the longer the timespan it represents. ‘Data sources’ are sampled every few seconds and points are added to the highest resolution RRD. Periodically each high-frequency RRD is ‘consolidated’ (e.g. averaged) to produce a data point for a lower-frequency RRD.
RRDs are resident on the host on which the VM is running, or the pool coordinator when the VM is not running. The RRDs are backed up every day.
Granularity
Statistics are persisted for a maximum of one year, and are stored at different granularities. The average and most recent values are stored at intervals of:
- five seconds for the past ten minutes
- one minute for the past two hours
- one hour for the past week
- one day for the past year
RRDs are saved to disk as uncompressed XML. The size of each RRD when written to disk ranges from 200KiB to approximately 1.2MiB when the RRD stores the full year of statistics.
By default each RRD contains only averaged data to save storage space. To record minimum and maximum values in future RRDs, set the Pool-wide flag
xe pool-param-set uuid= other-config:create_min_max_in_new_VM_RRDs=true
Downloading
Statistics can be downloaded over HTTP in XML or JSON format, for example
using wget
.
See rrddump and
rrdxport for information
about the XML format.
The JSON format has the same structure as the XML.
Parameters are appended to the URL following a question mark (?) and separated
by ampersands (&).
HTTP authentication can take the form of a username and password or a session
token in a URL parameter.
Statistics may be downloaded all at once, including all history, or as deltas suitable for interactive graphing.
Downloading statistics all at once
To obtain a full dump of RRD data for a host use:
wget http://hostname/host_rrd?session_id=OpaqueRef:43df3204-9360-c6ab-923e-41a8d19389ba"
where the session token has been fetched from the server using the API.
For example, using Python’s XenAPI library:
import XenAPI
username = "root"
password = "actual_password"
url = "http://hostname"
session = XenAPI.Session(url)
session.xenapi.login_with_password(username, password, "1.0", "session_getter")
session._session
A URL parameter is used to decide which format to return: XML is returned by
default, adding the parameter json
makes the server return JSON.
Starting from xapi version 23.17.0, the server uses the HTTP header Accept
to decide which format to return.
When both formats are accepted, for example, using */*
; JSON is returned.
Of interest are the clients wget and curl which use this accept header value,
meaning that when using them the default behaviour will change and the accept
header needs to be overridden to make the server return XML.
The content type is provided in the reponse’s headers in these newer versions.
The XML RRD data is in the format used by rrdtool and looks like this:
<?xml version="1.0"?>
<rrd>
<version>0003</version>
<step>5</step>
<lastupdate>1213616574</lastupdate>
<ds>
<name>memory_total_kib</name>
<type>GAUGE</type>
<minimal_heartbeat>300.0000</minimal_heartbeat>
<min>0.0</min>
<max>Infinity</max>
<last_ds>2070172</last_ds>
<value>9631315.6300</value>
<unknown_sec>0</unknown_sec>
</ds>
<ds>
<!-- other dss - the order of the data sources is important
and defines the ordering of the columns in the archives below -->
</ds>
<rra>
<cf>AVERAGE</cf>
<pdp_per_row>1</pdp_per_row>
<params>
<xff>0.5000</xff>
</params>
<cdp_prep> <!-- This is for internal use -->
<ds>
<primary_value>0.0</primary_value>
<secondary_value>0.0</secondary_value>
<value>0.0</value>
<unknown_datapoints>0</unknown_datapoints>
</ds>
...other dss - internal use only...
</cdp_prep>
<database>
<row>
<v>2070172.0000</v> <!-- columns correspond to the DSs defined above -->
<v>1756408.0000</v>
<v>0.0</v>
<v>0.0</v>
<v>732.2130</v>
<v>0.0</v>
<v>782.9186</v>
<v>0.0</v>
<v>647.0431</v>
<v>0.0</v>
<v>0.0001</v>
<v>0.0268</v>
<v>0.0100</v>
<v>0.0</v>
<v>615.1072</v>
</row>
...
</rra>
... other archives ...
</rrd>
To obtain a full dump of RRD data of a VM with uuid x
:
wget "http://hostname/vm_rrd?session_id=<token>&uuid=x"
Note that it is quite expensive to download full RRDs as they contain lots of historical information. For interactive displays clients should download deltas instead.
Downloading deltas
To obtain an update of all VM statistics on a host, the URL would be of the form:
wget "https://hostname/rrd_updates?session_id=<token>&start=<secondsinceepoch>"
This request returns data in an rrdtool xport
style XML format, for every VM
resident on the particular host that is being queried.
To differentiate which column in the export is associated with which VM, the
legend
field is prefixed with the UUID of the VM.
An example rrd_updates
output:
<xport>
<meta>
<start>1213578000</start>
<step>3600</step>
<end>1213617600</end>
<rows>12</rows>
<columns>12</columns>
<legend>
<entry>AVERAGE:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry> <!-- nb - each data source might have multiple entries for different consolidation functions -->
<entry>AVERAGE:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry>
<entry>AVERAGE:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry>
<entry>MIN:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry>
<entry>MIN:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry>
<entry>MIN:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry>
<entry>MAX:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry>
<entry>MAX:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry>
<entry>MAX:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry>
<entry>LAST:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu1</entry>
<entry>LAST:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:cpu0</entry>
<entry>LAST:vm:ecd8d7a0-1be3-4d91-bd0e-4888c0e30ab3:memory</entry>
</legend>
</meta>
<data>
<row>
<t>1213617600</t>
<v>0.0</v> <!-- once again, the order or the columns is defined by the legend above -->
<v>0.0282</v>
<v>209715200.0000</v>
<v>0.0</v>
<v>0.0201</v>
<v>209715200.0000</v>
<v>0.0</v>
<v>0.0445</v>
<v>209715200.0000</v>
<v>0.0</v>
<v>0.0243</v>
<v>209715200.0000</v>
</row>
...
</data>
</xport>
To obtain host updates too, use the query parameter host=true
:
wget "http://hostname/rrd_updates?session_id=<token>&start=<secondssinceepoch>&host=true"
The step will decrease as the period decreases, which means that if you request statistics for a shorter time period you will get more detailed statistics.
To download updates containing only the averages, or minimums or maximums,
add the parameter cf=AVERAGE|MIN|MAX
(note case is important) e.g.
wget "http://hostname/rrd_updates?session_id=<token>&start=0&cf=MAX"
To request a different update interval, add the parameter interval=seconds
e.g.
wget "http://hostname/rrd_updates?session_id=<token>&start=0&interval=5"
Snapshots
Snapshots represent the state of a VM, or a disk (VDI) at a point in time. They can be used for:
- backups (hourly, daily, weekly etc)
- experiments (take snapshot, try something, revert back again)
- golden images (install OS, get it just right, clone it 1000s of times)
Read more about Snapshots: the High-Level Feature.
Taking a VDI snapshot
To take a snapshot of a single disk (VDI):
snapshot_vdi <- VDI.snapshot(session_id, vdi, driver_params)
where vdi
is the reference to the disk to be snapshotted, and driver_params
is a list of string pairs providing optional backend implementation-specific hints.
The snapshot operation should be quick (i.e. it should never be implemented as
a slow disk copy) and the resulting VDI will have
Field name | Description |
---|---|
is_a_snapshot | a flag, set to true, indicating the disk is a snapshot |
snapshot_of | a reference to the disk the snapshot was created from |
snapshot_time | the time the snapshot was taken |
The resulting snapshot should be considered read-only. Depending on the backend implementation it may be technically possible to write to the snapshot, but clients must not do this. To create a writable disk from a snapshot, see “restoring from a snapshot” below.
Note that the storage backend is free to implement this in different ways. We do not assume the presence of a .vhd-formatted storage repository. Clients must never assume anything about the backend implementation without checking first with the maintainers of the backend implementation.
Restoring to a VDI snapshot
To restore from a VDI snapshot first
new_vdi <- VDI.clone(session_id, snapshot_vdi, driver_params)
where snapshot_vdi
is a reference to the snapshot VDI, and driver_params
is a list of string pairs providing optional backend implementation-specific hints.
The clone operation should be quick (i.e. it should never be implemented as
a slow disk copy) and the resulting VDI will have
Field name | Description |
---|---|
is_a_snapshot | a flag, set to false, indicating the disk is not a snapshot |
snapshot_of | an invalid reference |
snapshot_time | an invalid time |
The resulting disk is writable and can be used by the client as normal.
Note that the “restored” VDI will have a different VDI.uuid
and reference to
the original VDI.
Taking a VM snapshot
A VM snapshot is a copy of the VM metadata and a snapshot of all the associated VDIs at around the same point in time. To take a VM snapshot:
snapshot_vm <- VM.snapshot(session_id, vm, new_name)
where vm
is a reference to the existing VM and new_name
will be the name_label
of the resulting VM (snapshot) object. The resulting VM will have
Field name | Description |
---|---|
is_a_snapshot | a flag, set to true, indicating the VM is a snapshot |
snapshot_of | a reference to the VM the snapshot was created from |
snapshot_time | the time the snapshot was taken |
Note that each disk is snapshotted one-by-one and not at the same time.
Restoring to a VM snapshot
A VM snapshot can be reverted to a snapshot using
VM.revert(session_id, snapshot_ref)
where snapshot_ref
is a reference to the snapshot VM. Each VDI associated with
the VM before the snapshot will be destroyed and each VDI associated with the
snapshot will be cloned (see “Reverting to a disk snapshot” above) and associated
with the VM. The resulting VM will have
Field name | Description |
---|---|
is_a_snapshot | a flag, set to false, indicating the VM is not a snapshot |
snapshot_of | an invalid reference |
snapshot_time | an invalid time |
Note that the VM.uuid
and reference are preserved, but the VDI.uuid
and
VDI references are not.
Downloading a disk or snapshot
Disks can be downloaded in either raw or vhd format using an HTTP 1.0 GET request as follows:
GET /export_raw_vdi?session_id=%s&task_id=%s&vdi=%s&format=%s[&base=%s] HTTP/1.0\r\n
Connection: close\r\n
\r\n
\r\n
where
session_id
is a currently logged-in sessiontask_id
is aTask
reference which will be used to monitor the progress of this task and receive errors from itvdi
is the reference of theVDI
into which the data will be importedformat
is eithervhd
orraw
- (optional)
base
is the reference of aVDI
which has already been exported and this export should only contain the blocks which have changed since then.
Note that the vhd format allows the disk to be sparse i.e. only contain allocated blocks. This helps reduce the size of the download.
The xapi-project/xen-api repo has a python download example
Uploading a disk or snapshot
Disks can be uploaded in either raw or vhd format using an HTTP 1.0 PUT request as follows:
PUT /import_raw_vdi?session_id=%s&task_id=%s&vdi=%s&format=%s HTTP/1.0\r\n
Connection: close\r\n
\r\n
\r\n
where
session_id
is a currently logged-in sessiontask_id
is aTask
reference which will be used to monitor the progress of this task and receive errors from itvdi
is the reference of theVDI
into which the data will be importedformat
is eithervhd
orraw
Note that you must create the disk (with the correct size) before importing data to it. The disk doesn’t have to be empty, in fact if restoring from a series of incremental downloads it makes sense to upload them all to the same disk in order.
Example: incremental backup with xe
This section will show how easy it is to build an incremental backup
tool using these APIs. For simplicity we will use the xe
commands
rather than raw XMLRPC and HTTP.
For a VDI with uuid $VDI, take a snapshot:
FULL=$(xe vdi-snapshot uuid=$VDI)
Next perform a full backup into a file “full.vhd”, in vhd format:
xe vdi-export uuid=$FULL filename=full.vhd format=vhd --progress
If the SR was using the vhd format internally (this is the default) then the full backup will be sparse and will only contain blocks if they have been written to.
After some time has passed and the VDI has been written to, take another snapshot:
DELTA=$(xe vdi-snapshot uuid=$VDI)
Now we can backup only the disk blocks which have changed between the original snapshot $FULL and the next snapshot $DELTA into a file called “delta.vhd”:
xe vdi-export uuid=$DELTA filename=delta.vhd format=vhd base=$FULL --progress
We now have 2 files on the local system:
- “full.vhd”: a complete backup of the first snapshot
- “delta.vhd”: an incremental backup of the second snapshot, relative to the first
For example:
test $ ls -lh *.vhd
-rw------- 1 dscott xendev 213M Aug 15 10:39 delta.vhd
-rw------- 1 dscott xendev 8.0G Aug 15 10:39 full.vhd
To restore the original snapshot you must create an empty disk with the
correct size. To find the size of a .vhd file use qemu-img
as follows:
test $ qemu-img info delta.vhd
image: delta.vhd
file format: vpc
virtual size: 24G (25769705472 bytes)
disk size: 212M
Here the size is 25769705472 bytes. Create a fresh VDI in SR $SR to restore the backup as follows:
SIZE=25769705472
RESTORE=$(xe vdi-create name-label=restored virtual-size=$SIZE sr-uuid=$SR type=user)
then import “full.vhd” into it:
xe vdi-import uuid=$RESTORE filename=full.vhd format=vhd --progress
Once “full.vhd” has been imported, the incremental backup can be restored on top:
xe vdi-import uuid=$RESTORE filename=delta.vhd format=vhd --progress
Note there is no need to supply a “base” parameter when importing; Xapi will treat the “vhd differencing disk” as a set of blocks and import them. It is up to you to check you are importing them to the right place.
Now the VDI $RESTORE should have the same contents as $DELTA.
VM consoles
Most XenAPI graphical interfaces will want to gain access to the VM consoles, in order to render them to the user as if they were physical machines. There are several types of consoles available, depending on the type of guest or if the physical host console is being accessed:
Types of consoles
Operating System | Text | Graphical | Optimized graphical |
---|---|---|---|
Windows | No | VNC, using an API call | RDP, directly from guest |
Linux | Yes, through VNC and an API call | No | VNC, directly from guest |
Physical Host | Yes, through VNC and an API call | No | No |
Hardware-assisted VMs, such as Windows, directly provide a graphical console over VNC. There is no text-based console, and guest networking is not necessary to use the graphical console. Once guest networking has been established, it is more efficient to setup Remote Desktop Access and use an RDP client to connect directly (this must be done outside of the XenAPI).
Paravirtual VMs, such as Linux guests, provide a native text console directly. XenServer provides a utility (called vncterm
) to convert this text-based console into a graphical VNC representation. Guest networking is not necessary for this console to function. As with Windows above, Linux distributions often configure VNC within the guest, and directly connect to it over a guest network interface.
The physical host console is only available as a vt100
console, which is exposed through the XenAPI as a VNC console by using vncterm
in the control domain.
RFB (Remote Framebuffer) is the protocol which underlies VNC, specified in The RFB Protocol. Third-party developers are expected to provide their own VNC viewers, and many freely available implementations can be adapted for this purpose. RFB 3.3 is the minimum version which viewers must support.
Retrieving VNC consoles using the API
VNC consoles are retrieved using a special URL passed through to the host agent. The sequence of API calls is as follows:
Client to Master/443: XML-RPC:
Session.login_with_password()
.Master/443 to Client: Returns a session reference to be used with subsequent calls.
Client to Master/443: XML-RPC:
VM.get_by_name_label()
.Master/443 to Client: Returns a reference to a particular VM (or the “control domain” if you want to retrieve the physical host console).
Client to Master/443: XML-RPC:
VM.get_consoles()
.Master/443 to Client: Returns a list of console objects associated with the VM.
Client to Master/443: XML-RPC:
VM.get_location()
.Returns a URI describing where the requested console is located. The URIs are of the form:
https://192.168.0.1/console?ref=OpaqueRef:c038533a-af99-a0ff-9095-c1159f2dc6a0
.Client to 192.168.0.1: HTTP CONNECT “/console?ref=(…)”
The final HTTP CONNECT is slightly non-standard since the HTTP/1.1 RFC specifies that it should only be a host and a port, rather than a URL. Once the HTTP connect is complete, the connection can subsequently directly be used as a VNC server without any further HTTP protocol action.
This scheme requires direct access from the client to the control domain’s IP, and will not work correctly if there are Network Address Translation (NAT) devices blocking such connectivity. You can use the CLI to retrieve the console URI from the client and perform a connectivity check.
Retrieve the VM UUID by running:
$ VM=$(xe vm-list params=uuid --minimal name-label=<name>)
Retrieve the console information:
$ xe console-list vm-uuid=$VM
uuid ( RO) : 8013b937-ff7e-60d1-ecd8-e52d66c5879e
vm-uuid ( RO): 2d7c558a-8f03-b1d0-e813-cbe7adfa534c
vm-name-label ( RO): 6
protocol ( RO): RFB
location ( RO): https://10.80.228.30/console?uuid=8013b937-ff7e-60d1-ecd8-e52d66c5879e
Use command-line utilities like ping
to test connectivity to the IP address provided in the location
field.
Disabling VNC forwarding for Linux VM
When creating and destroying Linux VMs, the host agent automatically manages the vncterm
processes which convert the text console into VNC. Advanced users who wish to directly access the text console can disable VNC forwarding for that VM. The text console can then only be accessed directly from the control domain directly, and graphical interfaces such as XenCenter will not be able to render a console for that VM.
Before starting the guest, set the following parameter on the VM record:
$ xe vm-param-set uuid=$VM other-config:disable_pv_vnc=1
Start the VM.
Use the CLI to retrieve the underlying domain ID of the VM with:
$ DOMID=$(xe vm-list params=dom-id uuid=$VM --minimal)
On the host console, connect to the text console directly by:
$ /usr/lib/xen/bin/xenconsole $DOMID
This configuration is an advanced procedure, and we do not recommend that the text console is directly used for heavy I/O operations. Instead, connect to the guest over SSH or some other network-based connection mechanism.
VM import/export
VMs can be exported to a file and later imported to any Xapi host. The export
protocol is a simple HTTP(S) GET, which should be sent to the Pool master.
Authorization is either via a pre-created session_id
or by HTTP basic
authentication (particularly useful on the command-line).
The VM to export is specified either by UUID or by reference. To keep track of
the export, a task can be created and passed in using its reference. Note that
Xapi may send an HTTP redirect if a different host has better access to the
disk data.
The following arguments are passed as URI query parameters or HTTP cookies:
Argument | Description |
---|---|
session_id | the reference of the session being used to authenticate; required only when not using HTTP basic authentication |
task_id | the reference of the task object with which to keep track of the operation; optional, required only if you have created a task object to keep track of the export |
ref | the reference of the VM; required only if not using the UUID |
uuid | the UUID of the VM; required only if not using the reference |
use_compression | an optional boolean “true” or “false” (defaulting to “false”). If “true” then the output will be gzip-compressed before transmission. |
For example, using the Linux command line tool cURL:
$ curl http://root:foo@myxenserver1/export?uuid=<vm_uuid> -o <exportfile>
will export the specified VM to the file exportfile
.
To export just the metadata, use the URI http://server/export_metadata
.
The import protocol is similar, using HTTP(S) PUT. The session_id
and task_id
arguments are as for the export. The ref
and uuid
are not used; a new reference and uuid will be generated for the VM. There are some additional parameters:
Argument | Description |
---|---|
restore | if true , the import is treated as replacing the original VM - the implication of this currently is that the MAC addresses on the VIFs are exactly as the export was, which will lead to conflicts if the original VM is still being run. |
force | if true , any checksum failures will be ignored (the default is to destroy the VM if a checksum error is detected) |
sr_id | the reference of an SR into which the VM should be imported. The default behavior is to import into the Pool.default_SR |
Note there is no need to specify whether the export is compressed, as Xapi will automatically detect and decompress gzip-encoded streams.
For example, again using cURL:
curl -T <exportfile> http://root:foo@myxenserver2/import
will import the VM to the default SR on the server.
Note
Note that if no default SR has been set, and no
sr_uuid
is specified, the error messageDEFAULT_SR_NOT_FOUND
is returned.
Another example:
curl -T <exportfile> http://root:foo@myxenserver2/import?sr_id=<ref_of_sr>
will import the VM to the specified SR on the server.
To import just the metadata, use the URI http://server/import_metadata
Legacy VM Import Format
This section describes the legacy VM import/export format and is for historical interest only. It should be updated to describe the current format, see issue 64
Xapi supports a human-readable legacy VM input format called XVA. This section describes the syntax and structure of XVA.
An XVA consists of a directory containing XML metadata and a set of disk images. A VM represented by an XVA is not intended to be directly executable. Data within an XVA package is compressed and intended for either archiving on permanent storage or for being transmitted to a VM server - such as a XenServer host - where it can be decompressed and executed.
XVA is a hypervisor-neutral packaging format; it should be possible to create simple tools to instantiate an XVA VM on any other platform. XVA does not specify any particular runtime format; for example disks may be instantiated as file images, LVM volumes, QCoW images, VMDK or VHD images. An XVA VM may be instantiated any number of times, each instantiation may have a different runtime format.
XVA does not:
specify any particular serialization or transport format
provide any mechanism for customizing VMs (or templates) on install
address how a VM may be upgraded post-install
define how multiple VMs, acting as an appliance, may communicate
These issues are all addressed by the related Open Virtual Appliance specification.
An XVA is a directory containing, at a minimum, a file called ova.xml
. This file describes the VM contained within the XVA and is described in Section 3.2. Disks are stored within sub-directories and are referenced from the ova.xml. The format of disk data is described later in Section 3.3.
The following terms will be used in the rest of the chapter:
HVM: a mode in which unmodified OS kernels run with the help of virtualization support in the hardware.
PV: a mode in which specially modified “paravirtualized” kernels run explicitly on top of a hypervisor without requiring hardware support for virtualization.
The “ova.xml” file contains the following elements:
<appliance version="0.1">
The number in the attribute “version” indicates the version of this specification to which the XVA is constructed; in this case version 0.1. Inside the <appliance> there is exactly one <vm>: (in the OVA specification, multiple <vm>s are permitted)
<vm name="name">
Each <vm>
element describes one VM. The “name” attribute is for future internal use only and must be unique within the ova.xml file. The “name” attribute is permitted to be any valid UTF-8 string. Inside each <vm> tag are the following compulsory elements:
<label>... text ... </label>
A short name for the VM to be displayed in a UI.
<shortdesc> ... description ... </shortdesc>
A description for the VM to be displayed in the UI. Note that for both <label>
and <shortdesc>
contents, leading and trailing whitespace will be ignored.
<config mem_set="268435456" vcpus="1"/>
The <config>
element has attributes which describe the amount of memory in bytes (mem_set
) and number of CPUs (VCPUs) the VM should have.
Each <vm>
has zero or more <vbd>
elements representing block devices which look like the following:
<vbd device="sda" function="root" mode="w" vdi="vdi_sda"/>
The attributes have the following meanings:
device
: name of the physical device to expose to the VM. For linux guests we use “sd[a-z]” and for windows guests we use “hd[a-d]”.function
: if marked as “root”, this disk will be used to boot the guest. (NB this does not imply the existence of the Linux root i.e. / filesystem) Only one device should be marked as “root”. See Section 3.4 describing VM booting. Any other string is ignored.mode
: either “w” or “ro” if the device is to be read/write or read-onlyvdi
: the name of the disk image (represented by a<vdi>
element) to which this block device is connected
Each <vm>
may have an optional <hacks>
section like the following:
<hacks is_hvm="false" kernel_boot_cmdline="root=/dev/sda1 ro"/>
The <hacks>
element will be removed in future. The attribute is_hvm
is
either true
or false
, depending on whether the VM should be booted in HVM or not.
The kernel_boot_cmdline
contains additional kernel commandline arguments when
booting a guest using pygrub.
In addition to a <vm>
element, the <appliance>
will contain zero or more
<vdi>
elements like the following:
<vdi name="vdi_sda" size="5368709120" source="file://sda" type="dir-gzipped-chunks">
Each <vdi>
corresponds to a disk image. The attributes have the following meanings:
name
: name of the VDI, referenced by the vdi attribute of<vbd>
elements. Any valid UTF-8 string is permitted.size
: size of the required image in bytessource
: a URI describing where to find the data for the image, only file:// URIs are currently permitted and must describe paths relative to the directory containing the ova.xmltype
: describes the format of the disk data
A single disk image encoding is specified in which has type “dir-gzipped-chunks”: Each image is represented by a directory containing a sequence of files as follows:
-rw-r--r-- 1 dscott xendev 458286013 Sep 18 09:51 chunk000000000.gz
-rw-r--r-- 1 dscott xendev 422271283 Sep 18 09:52 chunk000000001.gz
-rw-r--r-- 1 dscott xendev 395914244 Sep 18 09:53 chunk000000002.gz
-rw-r--r-- 1 dscott xendev 9452401 Sep 18 09:53 chunk000000003.gz
-rw-r--r-- 1 dscott xendev 1096066 Sep 18 09:53 chunk000000004.gz
-rw-r--r-- 1 dscott xendev 971976 Sep 18 09:53 chunk000000005.gz
-rw-r--r-- 1 dscott xendev 971976 Sep 18 09:53 chunk000000006.gz
-rw-r--r-- 1 dscott xendev 971976 Sep 18 09:53 chunk000000007.gz
-rw-r--r-- 1 dscott xendev 573930 Sep 18 09:53 chunk000000008.gz
Each file (named “chunk-XXXXXXXXX.gz”) is a gzipped file containing exactly 1e9 bytes (1GB, not 1GiB) of raw block data. The small size was chosen to be safely under the maximum file size limits of several filesystems. If the files are gunzipped and then concatenated together, the original image is recovered.
Because the import and export of VMs can take some time to complete, an asynchronous HTTP interface to the import and export operations is provided. To perform an export using the XenServer API, construct an HTTP GET call providing a valid session ID, task ID and VM UUID, as shown in the following pseudo code:
task = Task.create()
result = HTTP.get(
server, 80, "/export?session_id=&task_id=&ref=");
For the import operation, use an HTTP PUT call as demonstrated in the following pseudo code:
task = Task.create()
result = HTTP.put(
server, 80, "/import?session_id=&task_id=&ref=");
VM Lifecycle
The following figure shows the states that a VM can be in and the API calls that can be used to move the VM between these states.
graph halted-- start(paused) -->paused halted-- start(not paused) -->running running-- suspend -->suspended suspended-- resume(not paused) -->running suspended-- resume(paused) -->paused suspended-- hard shutdown -->halted paused-- unpause -->running paused-- hard shutdown -->halted running-- clean shutdown\n hard shutdown -->halted running-- pause -->paused halted-- destroy -->destroyed
VM boot parameters
The VM
class contains a number of fields that control the way in which the VM
is booted. With reference to the fields defined in the VM class (see later in
this document), this section outlines the boot options available and the
mechanisms provided for controlling them.
VM booting is controlled by setting one of the two mutually exclusive groups:
“PV” and “HVM”. If HVM.boot_policy
is an empty string, then paravirtual
domain building and booting will be used; otherwise the VM will be loaded as a
HVM domain, and booted using an emulated BIOS.
When paravirtual booting is in use, the PV_bootloader
field indicates the
bootloader to use. It may be “pygrub”, in which case the platform’s default
installation of pygrub will be used, or a full path within the control domain to
some other bootloader. The other fields, PV_kernel
, PV_ramdisk
, PV_args
,
and PV_bootloader_args
will be passed to the bootloader unmodified, and
interpretation of those fields is then specific to the bootloader itself,
including the possibility that the bootloader will ignore some or all of
those given values. Finally the paths of all bootable disks are added to the
bootloader commandline (a disk is bootable if its VBD has the bootable flag set).
There may be zero, one, or many bootable disks; the bootloader decides which
disk (if any) to boot from.
If the bootloader is pygrub, then the menu.lst is parsed, if present in the
guest’s filesystem, otherwise the specified kernel and ramdisk are used, or an
autodetected kernel is used if nothing is specified and autodetection is
possible. PV_args
is appended to the kernel command line, no matter which
mechanism is used for finding the kernel.
If PV_bootloader
is empty but PV_kernel
is specified, then the kernel and
ramdisk values will be treated as paths within the control domain. If both
PV_bootloader
and PV_kernel
are empty, then the behaviour is as if
PV_bootloader
were specified as “pygrub”.
When using HVM booting, HVM_boot_policy
and HVM_boot_params
specify the boot
handling. Only one policy is currently defined, “BIOS order”. In this case,
HVM_boot_params
should contain one key-value pair “order” = “N” where N is the
string that will be passed to QEMU.
Optionally HVM_boot_params
can contain another key-value pair “firmware”
with values “bios” or “uefi” (default is “bios” if absent).
By default Secure Boot is not enabled, it can be enabled when “uefi” is enabled
by setting VM.platform["secureboot"]
to true.
XenCenter
XenCenter uses some conventions on top of the XenAPI:
Internationalization for SR names
The SRs created at install time now have an other_config
key indicating how their names may be internationalized.
other_config["i18n-key"]
may be one of
local-hotplug-cd
local-hotplug-disk
local-storage
xenserver-tools
Additionally, other_config["i18n-original-value-<field name>"]
gives the value of that field when the SR was created. If XenCenter sees a record where SR.name_label
equals other_config["i18n-original-value-name_label"]
(that is, the record has not changed since it was created during XenServer installation), then internationalization will be applied. In other words, XenCenter will disregard the current contents of that field, and instead use a value appropriate to the user’s own language.
If you change SR.name_label
for your own purpose, then it no longer is the same as other_config["i18n-original-value-name_label"]
. Therefore, XenCenter does not apply internationalization, and instead preserves your given name.
Hiding objects from XenCenter
Networks, PIFs, and VMs can be hidden from XenCenter by adding the key HideFromXenCenter=true
to the other_config
parameter for the object. This capability is intended for ISVs who know what they are doing, not general use by everyday users. For example, you might want to hide certain VMs because they are cloned VMs that shouldn’t be used directly by general users in your environment.
In XenCenter, hidden Networks, PIFs, and VMs can be made visible, using the View menu.