%
% Copyright (c) 2006-2007 XenSource, Inc.
% Copyright (c) 2009 flonatel GmbH & Co. KG
%
% Permission is granted to copy, distribute and/or modify this document under
% the terms of the GNU Free Documentation License, Version 1.2 or any later
% version published by the Free Software Foundation; with no Invariant
% Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the
% license is included in the section entitled
% "GNU Free Documentation License" or the file fdl.tex.
%
% Authors: Ewan Mellor, Richard Sharp, Dave Scott, Jon Harrop.
% Contributor: Andreas Florath
%
\chapter{API Reference}
\label{api-reference}
\section{Classes}
The following classes are defined:
\begin{center}\begin{tabular}{|lp{10cm}|}
\hline
Name & Description \\
\hline
{\tt session} & A session \\
{\tt task} & A long-running asynchronous task \\
{\tt event} & Asynchronous event registration and handling \\
{\tt VM} & A virtual machine (or 'guest') \\
{\tt VM\_metrics} & The metrics associated with a VM \\
{\tt VM\_guest\_metrics} & The metrics reported by the guest (as opposed to inferred from outside) \\
{\tt host} & A physical host \\
{\tt host\_metrics} & The metrics associated with a host \\
{\tt host\_cpu} & A physical CPU \\
{\tt network} & A virtual network \\
{\tt VIF} & A virtual network interface \\
{\tt VIF\_metrics} & The metrics associated with a virtual network device \\
{\tt PIF} & A physical network interface (note separate VLANs are represented as several PIFs) \\
{\tt PIF\_metrics} & The metrics associated with a physical network interface \\
{\tt SR} & A storage repository \\
{\tt VDI} & A virtual disk image \\
{\tt VBD} & A virtual block device \\
{\tt VBD\_metrics} & The metrics associated with a virtual block device \\
{\tt PBD} & The physical block devices through which hosts access SRs \\
{\tt crashdump} & A VM crashdump \\
{\tt VTPM} & A virtual TPM device \\
{\tt console} & A console \\
{\tt DPCI} & A pass-through PCI device \\
{\tt PPCI} & A physical PCI device \\
{\tt DSCSI} & A half-virtualized SCSI device \\
{\tt DSCSI\_HBA} & A half-virtualized SCSI host bus adapter \\
{\tt PSCSI} & A physical SCSI device \\
{\tt PSCSI\_HBA} & A physical SCSI host bus adapter \\
{\tt user} & A user of the system \\
{\tt debug} & A basic class for testing \\
{\tt XSPolicy} & A class for handling Xen Security Policies \\
{\tt ACMPolicy} & A class for handling ACM-type policies \\
{\tt cpu\_pool} & A container for VMs which should shared the same host\_cpu(s) \\
\hline
\end{tabular}\end{center}
\section{Relationships Between Classes}
Fields that are bound together are shown in the following table:
\begin{center}\begin{tabular}{|ll|l|}
\hline
{\em object.field} & {\em object.field} & {\em relationship} \\
\hline
host.PBDs & PBD.host & many-to-one\\
SR.PBDs & PBD.SR & many-to-one\\
VDI.VBDs & VBD.VDI & many-to-one\\
VDI.crash\_dumps & crashdump.VDI & many-to-one\\
VBD.VM & VM.VBDs & one-to-many\\
crashdump.VM & VM.crash\_dumps & one-to-many\\
VIF.VM & VM.VIFs & one-to-many\\
VIF.network & network.VIFs & one-to-many\\
PIF.host & host.PIFs & one-to-many\\
PIF.network & network.PIFs & one-to-many\\
SR.VDIs & VDI.SR & many-to-one\\
VTPM.VM & VM.VTPMs & one-to-many\\
console.VM & VM.consoles & one-to-many\\
DPCI.VM & VM.DPCIs & one-to-many\\
PPCI.host & host.PPCIs & one-to-many\\
DSCSI.VM & VM.DSCSIs & one-to-many\\
DSCSI.HBA & DSCSI\_HBA.DSCSIs & one-to-many\\
DSCSI\_HBA.VM & VM.DSCSI\_HBAs & one-to-many\\
PSCSI.host & host.PSCSIs & one-to-many\\
PSCSI.HBA & PSCSI\_HBA.PSCSIs & one-to-many\\
PSCSI\_HBA.host & host.PSCSI\_HBAs & one-to-many\\
host.resident\_VMs & VM.resident\_on & many-to-one\\
host.host\_CPUs & host\_cpu.host & many-to-one\\
host.resident\_cpu\_pools & cpu\_pool.resident\_on & many-to-one\\
cpu\_pool.started\_VMs & VM.cpu\_pool & many-to-one\\
cpu\_pool.host\_CPUs & host\_cpu.cpu\_pool & many-to-one\\
\hline
\end{tabular}\end{center}
The following represents bound fields (as specified above) diagrammatically, using crows-foot notation to specify one-to-one, one-to-many or many-to-many
relationships:
\begin{center}\resizebox{0.8\textwidth}{!}{
\includegraphics{xenapi-datamodel-graph}
}\end{center}
\
\subsection{List of bound fields}
\section{Types}
\subsection{Primitives}
The following primitive types are used to specify methods and fields in the API Reference:
\begin{center}\begin{tabular}{|ll|}
\hline
Type & Description \\
\hline
String & text strings \\
Int & 64-bit integers \\
Float & IEEE double-precision floating-point numbers \\
Bool & boolean \\
DateTime & date and timestamp \\
Ref (object name) & reference to an object of class name \\
\hline
\end{tabular}\end{center}
\subsection{Higher order types}
The following type constructors are used:
\begin{center}\begin{tabular}{|ll|}
\hline
Type & Description \\
\hline
List (t) & an arbitrary-length list of elements of type t \\
Map (a $\rightarrow$ b) & a table mapping values of type a to values of type b \\
\hline
\end{tabular}\end{center}
\subsection{Enumeration types}
The following enumeration types are used:
\begin{longtable}{|ll|}
\hline
{\tt enum event\_operation} & \\
\hline
\hspace{0.5cm}{\tt add} & An object has been created \\
\hspace{0.5cm}{\tt del} & An object has been deleted \\
\hspace{0.5cm}{\tt mod} & An object has been modified \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum console\_protocol} & \\
\hline
\hspace{0.5cm}{\tt vt100} & VT100 terminal \\
\hspace{0.5cm}{\tt rfb} & Remote FrameBuffer protocol (as used in VNC) \\
\hspace{0.5cm}{\tt rdp} & Remote Desktop Protocol \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum vdi\_type} & \\
\hline
\hspace{0.5cm}{\tt system} & a disk that may be replaced on upgrade \\
\hspace{0.5cm}{\tt user} & a disk that is always preserved on upgrade \\
\hspace{0.5cm}{\tt ephemeral} & a disk that may be reformatted on upgrade \\
\hspace{0.5cm}{\tt suspend} & a disk that stores a suspend image \\
\hspace{0.5cm}{\tt crashdump} & a disk that stores VM crashdump information \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum vm\_power\_state} & \\
\hline
\hspace{0.5cm}{\tt Halted} & Halted \\
\hspace{0.5cm}{\tt Paused} & Paused \\
\hspace{0.5cm}{\tt Running} & Running \\
\hspace{0.5cm}{\tt Suspended} & Suspended \\
\hspace{0.5cm}{\tt Crashed} & Crashed \\
\hspace{0.5cm}{\tt Unknown} & Some other unknown state \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum task\_allowed\_operations} & \\
\hline
\hspace{0.5cm}{\tt Cancel} & Cancel \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum task\_status\_type} & \\
\hline
\hspace{0.5cm}{\tt pending} & task is in progress \\
\hspace{0.5cm}{\tt success} & task was completed successfully \\
\hspace{0.5cm}{\tt failure} & task has failed \\
\hspace{0.5cm}{\tt cancelling} & task is being cancelled \\
\hspace{0.5cm}{\tt cancelled} & task has been cancelled \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum on\_normal\_exit} & \\
\hline
\hspace{0.5cm}{\tt destroy} & destroy the VM state \\
\hspace{0.5cm}{\tt restart} & restart the VM \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum on\_crash\_behaviour} & \\
\hline
\hspace{0.5cm}{\tt destroy} & destroy the VM state \\
\hspace{0.5cm}{\tt coredump\_and\_destroy} & record a coredump and then destroy the VM state \\
\hspace{0.5cm}{\tt restart} & restart the VM \\
\hspace{0.5cm}{\tt coredump\_and\_restart} & record a coredump and then restart the VM \\
\hspace{0.5cm}{\tt preserve} & leave the crashed VM as-is \\
\hspace{0.5cm}{\tt rename\_restart} & rename the crashed VM and start a new copy \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum vbd\_mode} & \\
\hline
\hspace{0.5cm}{\tt RO} & disk is mounted read-only \\
\hspace{0.5cm}{\tt RW} & disk is mounted read-write \\
\hline
\end{longtable}
\vspace{1cm}
\begin{longtable}{|ll|}
\hline
{\tt enum vbd\_type} & \\
\hline
\hspace{0.5cm}{\tt CD} & VBD will appear to guest as CD \\
\hspace{0.5cm}{\tt Disk} & VBD will appear to guest as disk \\
\hline
\end{longtable}
\vspace{1cm}
\newpage
\section{Error Handling}
When a low-level transport error occurs, or a request is malformed at the HTTP
or XML-RPC level, the server may send an XML-RPC Fault response, or the client
may simulate the same. The client must be prepared to handle these errors,
though they may be treated as fatal. On the wire, these are transmitted in a
form similar to this:
\begin{verbatim}
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>-1</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Malformed request</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
\end{verbatim}
All other failures are reported with a more structured error response, to
allow better automatic response to failures, proper internationalisation of
any error message, and easier debugging. On the wire, these are transmitted
like this:
\begin{verbatim}
<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>eSpeil Inc.</value>
<value>eSpeil Incorporated</value>
</data>
</array>
</value>
</member>
</struct>
\end{verbatim}
Note that {\tt 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 {\tt Customer $\rightarrow$
eSpiel Incorporated} to a Map, but it already contains the mapping
{\tt Customer $\rightarrow$ eSpiel Inc.}, and so the request has failed.
The reference below lists each possible error returned by each method.
As well as the errors explicitly listed, any method may return low-level
errors as described above, or any of the following generic errors:
\begin{itemize}
\item HANDLE\_INVALID
\item INTERNAL\_ERROR
\item MAP\_DUPLICATE\_KEY
\item MESSAGE\_METHOD\_UNKNOWN
\item MESSAGE\_PARAMETER\_COUNT\_MISMATCH
\item OPERATION\_NOT\_ALLOWED
\item PERMISSION\_DENIED
\item SESSION\_INVALID
\end{itemize}
Each possible error code is documented in the following section.
\subsection{Error Codes}
\subsubsection{HANDLE\_INVALID}
You gave an invalid handle. The object may have recently been deleted.
The class parameter gives the type of reference given, and the handle
parameter echoes the bad value given.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}HANDLE_INVALID(class, handle)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{INTERNAL\_ERROR}
The server failed to handle your request, due to an internal error. The
given message may give details useful for debugging the problem.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}INTERNAL_ERROR(message)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{MAP\_DUPLICATE\_KEY}
You tried to add a key-value pair to a map, but that key is already there.
The key, current value, and the new value that you tried to set are all
echoed.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}MAP_DUPLICATE_KEY(key, current value, new value)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{MESSAGE\_METHOD\_UNKNOWN}
You tried to call a method that does not exist. The method name that you
used is echoed.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}MESSAGE_METHOD_UNKNOWN(method)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{MESSAGE\_PARAMETER\_COUNT\_MISMATCH}
You tried to call a method with the incorrect number of parameters. The
fully-qualified method name that you used, and the number of received and
expected parameters are returned.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}MESSAGE_PARAMETER_COUNT_MISMATCH(method, expected, received)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{NETWORK\_ALREADY\_CONNECTED}
You tried to create a PIF, but the network you tried to attach it to is
already attached to some other PIF, and so the creation failed.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}NETWORK_ALREADY_CONNECTED(network, connected PIF)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{OPERATION\_NOT\_ALLOWED}
You attempted an operation that was not allowed.
\vspace{0.3cm}
No parameters.
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{PERMISSION\_DENIED}
You do not have the required permissions to perform the operation.
\vspace{0.3cm}
No parameters.
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{PIF\_IS\_PHYSICAL}
You tried to destroy a PIF, but it represents an aspect of the physical
host configuration, and so cannot be destroyed. The parameter echoes the
PIF handle you gave.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}PIF_IS_PHYSICAL(PIF)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{SESSION\_AUTHENTICATION\_FAILED}
The credentials given by the user are incorrect, so access has been denied,
and you have not been issued a session handle.
\vspace{0.3cm}
No parameters.
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{SESSION\_INVALID}
You gave an invalid session handle. It may have been invalidated by a
server restart, or timed out. You should get a new session handle, using
one of the session.login\_ calls. This error does not invalidate the
current connection. The handle parameter echoes the bad value given.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}SESSION_INVALID(handle)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{SESSION\_NOT\_REGISTERED}
This session is not registered to receive events. You must call
event.register before event.next. The session handle you are using is
echoed.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}SESSION_NOT_REGISTERED(handle)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{VALUE\_NOT\_SUPPORTED}
You attempted to set a value that is not supported by this implementation.
The fully-qualified field name and the value that you tried to set are
returned. Also returned is a developer-only diagnostic reason.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}VALUE_NOT_SUPPORTED(field, value, reason)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{VLAN\_TAG\_INVALID}
You tried to create a VLAN, but the tag you gave was invalid -- it must be
between 0 and 4095. The parameter echoes the VLAN tag you gave.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}VLAN_TAG_INVALID(VLAN)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{VM\_BAD\_POWER\_STATE}
You attempted an operation on a VM that was not in an appropriate power
state at the time; for example, you attempted to start a VM that was
already running. The parameters returned are the VM's handle, and the
expected and actual VM state at the time of the call.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}VM_BAD_POWER_STATE(vm, expected, actual)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{VM\_HVM\_REQUIRED}
HVM is required for this operation
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}VM_HVM_REQUIRED(vm)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{SECURITY\_ERROR}
A security error occurred. The parameter provides the xen security
error code and a message describing the error.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}SECURITY_ERROR(xserr, message)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{POOL\_BAD\_STATE}
You attempted an operation on a pool that was not in an appropriate state
at the time; for example, you attempted to activate a pool that was
already activated.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}POOL_BAD_STATE(current pool state)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{INSUFFICIENT\_CPUS}
You attempted to activate a cpu\_pool but there are not enough
unallocated CPUs to satisfy the request.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}INSUFFICIENT_CPUS(needed cpu count, available cpu count)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{UNKOWN\_SCHED\_POLICY}
The specified scheduler policy is unkown to the host.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}UNKOWN_SCHED_POLICY()\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{INVALID\_CPU}
You tried to reconfigure a cpu\_pool with a CPU that is unkown to the host
or has a wrong state.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}INVALID_CPU(message)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\subsubsection{LAST\_CPU\_NOT\_REMOVEABLE}
You tried to remove the last CPU from a cpu\_pool that has one or more
active domains.
\vspace{0.3cm}
{\bf Signature:}
\begin{verbatim}LAST_CPU_NOT_REMOVEABLE(message)\end{verbatim}
\begin{center}\rule{10em}{0.1pt}\end{center}
\newpage
\section{Class: session}
\subsection{Fields for class: session}
\begin{longtable}{|lllp{0.38\textwidth}|}
\hline
\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf session} \\
\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
session.}} \\
\hline
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\
$\mathit{RO}_\mathit{run}$ & {\tt this\_host} & host ref & Currently connected host \\
$\mathit{RO}_\mathit{run}$ & {\tt this\_user} & user ref & Currently connected user \\
$\mathit{RO}_\mathit{run}$ & {\tt last\_active} & int & Timestamp for last time session was active \\
\hline
\end{longtable}
\subsection{RPCs associated with class: session}
\subsubsection{RPC name:~login\_with\_password}
{\bf Overview:}
Attempt to authenticate the user, returning a session\_id if successful.
\noindent {\bf Signature:}
\begin{verbatim} (session ref) login_with_password (string uname, string pwd)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & uname & Username for login. \\ \hline
{\tt string } & pwd & Password for login. \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
session ref
}
ID of newly created session
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt SESSION\_AUTHENTICATION\_FAILED}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~logout}
{\bf Overview:}
Log out of a session.
\noindent {\bf Signature:}
\begin{verbatim} void logout (session_id s)\end{verbatim}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_uuid}
{\bf Overview:}
Get the uuid field of the given session.
\noindent {\bf Signature:}
\begin{verbatim} string get_uuid (session_id s, session ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt session ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_this\_host}
{\bf Overview:}
Get the this\_host field of the given session.
\noindent {\bf Signature:}
\begin{verbatim} (host ref) get_this_host (session_id s, session ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt session ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
host ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_this\_user}
{\bf Overview:}
Get the this\_user field of the given session.
\noindent {\bf Signature:}
\begin{verbatim} (user ref) get_this_user (session_id s, session ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt session ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
user ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_last\_active}
{\bf Overview:}
Get the last\_active field of the given session.
\noindent {\bf Signature:}
\begin{verbatim} int get_last_active (session_id s, session ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt session ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_by\_uuid}
{\bf Overview:}
Get a reference to the session instance with the specified UUID.
\noindent {\bf Signature:}
\begin{verbatim} (session ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & uuid & UUID of object to return \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
session ref
}
reference to the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_record}
{\bf Overview:}
Get a record containing the current state of the given session.
\noindent {\bf Signature:}
\begin{verbatim} (session record) get_record (session_id s, session ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt session ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
session record
}
all fields from the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{1cm}
\newpage
\section{Class: task}
\subsection{Fields for class: task}
\begin{longtable}{|lllp{0.38\textwidth}|}
\hline
\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf task} \\
\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
long-running asynchronous task.}} \\
\hline
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\
$\mathit{RO}_\mathit{run}$ & {\tt name/label} & string & a human-readable name \\
$\mathit{RO}_\mathit{run}$ & {\tt name/description} & string & a notes field containg human-readable description \\
$\mathit{RO}_\mathit{run}$ & {\tt status} & task\_status\_type & current status of the task \\
$\mathit{RO}_\mathit{run}$ & {\tt session} & session ref & the session that created the task \\
$\mathit{RO}_\mathit{run}$ & {\tt progress} & int & if the task is still pending, this field contains the estimated percentage complete (0-100). If task has completed (successfully or unsuccessfully) this should be 100. \\
$\mathit{RO}_\mathit{run}$ & {\tt type} & string & 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. \\
$\mathit{RO}_\mathit{run}$ & {\tt result} & string & if the task has completed successfully, this field contains the result value (either Void or an object reference). Undefined otherwise. \\
$\mathit{RO}_\mathit{run}$ & {\tt error\_info} & string Set & if the task has failed, this field contains the set of associated error strings. Undefined otherwise. \\
$\mathit{RO}_\mathit{run}$ & {\tt allowed\_operations} & (task\_allowed\_operations) Set & Operations allowed on this task \\
\hline
\end{longtable}
\subsection{RPCs associated with class: task}
\subsubsection{RPC name:~cancel}
{\bf Overview:}
Cancel this task. If task.allowed\_operations does not contain Cancel,
then this will fail with OPERATION\_NOT\_ALLOWED. The task will show the
status 'cancelling', and you should continue to check its status until it
shows 'cancelled'. There is no guarantee as to the time within which this
task will be cancelled.
\noindent {\bf Signature:}
\begin{verbatim} void cancel (session_id s, task ref task)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & task & The task \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt OPERATION\_NOT\_ALLOWED}
\vspace{0.6cm}
\subsubsection{RPC name:~get\_all}
{\bf Overview:}
Return a list of all the tasks known to the system.
\noindent {\bf Signature:}
\begin{verbatim} ((task ref) Set) get_all (session_id s)\end{verbatim}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(task ref) Set
}
references to all objects
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_uuid}
{\bf Overview:}
Get the uuid field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} string get_uuid (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_name\_label}
{\bf Overview:}
Get the name/label field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} string get_name_label (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_name\_description}
{\bf Overview:}
Get the name/description field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} string get_name_description (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_status}
{\bf Overview:}
Get the status field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} (task_status_type) get_status (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
task\_status\_type
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_session}
{\bf Overview:}
Get the session field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} (session ref) get_session (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
session ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_progress}
{\bf Overview:}
Get the progress field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} int get_progress (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_type}
{\bf Overview:}
Get the type field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} string get_type (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_result}
{\bf Overview:}
Get the result field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} string get_result (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_error\_info}
{\bf Overview:}
Get the error\_info field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} (string Set) get_error_info (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_allowed\_operations}
{\bf Overview:}
Get the allowed\_operations field of the given task.
\noindent {\bf Signature:}
\begin{verbatim} ((task_allowed_operations) Set) get_allowed_operations (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(task\_allowed\_operations) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_by\_uuid}
{\bf Overview:}
Get a reference to the task instance with the specified UUID.
\noindent {\bf Signature:}
\begin{verbatim} (task ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & uuid & UUID of object to return \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
task ref
}
reference to the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_record}
{\bf Overview:}
Get a record containing the current state of the given task.
\noindent {\bf Signature:}
\begin{verbatim} (task record) get_record (session_id s, task ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt task ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
task record
}
all fields from the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_by\_name\_label}
{\bf Overview:}
Get all the task instances with the given label.
\noindent {\bf Signature:}
\begin{verbatim} ((task ref) Set) get_by_name_label (session_id s, string label)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & label & label of object to return \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(task ref) Set
}
references to objects with match names
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{1cm}
\newpage
\section{Class: event}
\subsection{Fields for class: event}
\begin{longtable}{|lllp{0.38\textwidth}|}
\hline
\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf event} \\
\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
Asynchronous event registration and handling.}} \\
\hline
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{ins}$ & {\tt id} & int & An ID, monotonically increasing, and local to the current session \\
$\mathit{RO}_\mathit{ins}$ & {\tt timestamp} & datetime & The time at which the event occurred \\
$\mathit{RO}_\mathit{ins}$ & {\tt class} & string & The name of the class of the object that changed \\
$\mathit{RO}_\mathit{ins}$ & {\tt operation} & event\_operation & The operation that was performed \\
$\mathit{RO}_\mathit{ins}$ & {\tt ref} & string & A reference to the object that changed \\
$\mathit{RO}_\mathit{ins}$ & {\tt obj\_uuid} & string & The uuid of the object that changed \\
\hline
\end{longtable}
\subsection{RPCs associated with class: event}
\subsubsection{RPC name:~register}
{\bf Overview:}
Registers this session with the event system. Specifying the empty list
will register for all classes.
\noindent {\bf Signature:}
\begin{verbatim} void register (session_id s, string Set classes)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string Set } & classes & register for events for the indicated classes \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~unregister}
{\bf Overview:}
Unregisters this session with the event system.
\noindent {\bf Signature:}
\begin{verbatim} void unregister (session_id s, string Set classes)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string Set } & classes & remove this session's registration for the indicated classes \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~next}
{\bf Overview:}
Blocking call which returns a (possibly empty) batch of events.
\noindent {\bf Signature:}
\begin{verbatim} ((event record) Set) next (session_id s)\end{verbatim}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(event record) Set
}
the batch of events
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt SESSION\_NOT\_REGISTERED}
\vspace{0.6cm}
\vspace{1cm}
\newpage
\section{Class: VM}
\subsection{Fields for class: VM}
\begin{longtable}{|llp{0.21\textwidth}p{0.33\textwidth}|}
\hline
\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VM} \\
\multicolumn{4}{|l|}{\parbox{11cm}{\em Description: A
virtual machine (or 'guest').}} \\
\hline
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\
$\mathit{RO}_\mathit{run}$ & {\tt power\_state} & vm\_power\_state & Current power state of the machine \\
$\mathit{RW}$ & {\tt name/label} & string & a human-readable name \\
$\mathit{RW}$ & {\tt name/description} & string & a notes field containg human-readable description \\
$\mathit{RW}$ & {\tt user\_version} & int & a user version number for this machine \\
$\mathit{RW}$ & {\tt is\_a\_template} & bool & true if this is a template. Template VMs can never be started, they are used only for cloning other VMs \\
$\mathit{RW}$ & {\tt auto\_power\_on} & bool & true if this VM should be started automatically after host boot \\
$\mathit{RO}_\mathit{run}$ & {\tt suspend\_VDI} & VDI ref & The VDI that a suspend image is stored on. (Only has meaning if VM is currently suspended) \\
$\mathit{RO}_\mathit{run}$ & {\tt resident\_on} & host ref & the host the VM is currently resident on \\
$\mathit{RW}$ & {\tt memory/static\_max} & int & Statically-set (i.e. absolute) maximum (bytes) \\
$\mathit{RW}$ & {\tt memory/dynamic\_max} & int & Dynamic maximum (bytes) \\
$\mathit{RW}$ & {\tt memory/dynamic\_min} & int & Dynamic minimum (bytes) \\
$\mathit{RW}$ & {\tt memory/static\_min} & int & Statically-set (i.e. absolute) minimum (bytes) \\
$\mathit{RW}$ & {\tt VCPUs/params} & (string $\rightarrow$ string) Map & configuration parameters for the selected VCPU policy \\
$\mathit{RW}$ & {\tt VCPUs/max} & int & Max number of VCPUs \\
$\mathit{RW}$ & {\tt VCPUs/at\_startup} & int & Boot number of VCPUs \\
$\mathit{RW}$ & {\tt actions/after\_shutdown} & on\_normal\_exit & action to take after the guest has shutdown itself \\
$\mathit{RW}$ & {\tt actions/after\_reboot} & on\_normal\_exit & action to take after the guest has rebooted itself \\
$\mathit{RW}$ & {\tt actions/after\_crash} & on\_crash\_behaviour & action to take if the guest crashes \\
$\mathit{RO}_\mathit{run}$ & {\tt consoles} & (console ref) Set & virtual console devices \\
$\mathit{RO}_\mathit{run}$ & {\tt VIFs} & (VIF ref) Set & virtual network interfaces \\
$\mathit{RO}_\mathit{run}$ & {\tt VBDs} & (VBD ref) Set & virtual block devices \\
$\mathit{RO}_\mathit{run}$ & {\tt crash\_dumps} & (crashdump ref) Set & crash dumps associated with this VM \\
$\mathit{RO}_\mathit{run}$ & {\tt VTPMs} & (VTPM ref) Set & virtual TPMs \\
$\mathit{RO}_\mathit{run}$ & {\tt DPCIs} & (DPCI ref) Set & pass-through PCI devices \\
$\mathit{RO}_\mathit{run}$ & {\tt DSCSIs} & (DSCSI ref) Set & half-virtualized SCSI devices \\
$\mathit{RO}_\mathit{run}$ & {\tt DSCSI\_HBAs} & (DSCSI\_HBA ref) Set & half-virtualized SCSI host bus adapters \\
$\mathit{RW}$ & {\tt PV/bootloader} & string & name of or path to bootloader \\
$\mathit{RW}$ & {\tt PV/kernel} & string & URI of kernel \\
$\mathit{RW}$ & {\tt PV/ramdisk} & string & URI of initrd \\
$\mathit{RW}$ & {\tt PV/args} & string & kernel command-line arguments \\
$\mathit{RW}$ & {\tt PV/bootloader\_args} & string & miscellaneous arguments for the bootloader \\
$\mathit{RW}$ & {\tt HVM/boot\_policy} & string & HVM boot policy \\
$\mathit{RW}$ & {\tt HVM/boot\_params} & (string $\rightarrow$ string) Map & HVM boot params \\
$\mathit{RW}$ & {\tt platform} & (string $\rightarrow$ string) Map & platform-specific configuration \\
$\mathit{RW}$ & {\tt PCI\_bus} & string & PCI bus path for pass-through devices \\
$\mathit{RW}$ & {\tt other\_config} & (string $\rightarrow$ string) Map & additional configuration \\
$\mathit{RO}_\mathit{run}$ & {\tt domid} & int & domain ID (if available, -1 otherwise) \\
$\mathit{RO}_\mathit{run}$ & {\tt is\_control\_domain} & bool & true if this is a control domain (domain 0 or a driver domain) \\
$\mathit{RO}_\mathit{run}$ & {\tt metrics} & VM\_metrics ref & metrics associated with this VM \\
$\mathit{RO}_\mathit{run}$ & {\tt guest\_metrics} & VM\_guest\_metrics ref & metrics associated with the running guest \\
$\mathit{RO}_\mathit{run}$ & {\tt security/label} & string & the VM's security label \\
\hline
\end{longtable}
\subsection{Parameter Details}
\subsubsection{PV/kernel and PV/ramdisk}
The \texttt{PV/kernel} and \texttt{PV/ramdisk} parameters should be
specified as URIs with either a \texttt{file} or \texttt{data} scheme.
The \texttt{file} scheme must be used when a file on the remote dom0
should be used. The remote dom0 is the one where the guest system
should be started on. Only absolute filenames are supported, i.e. the
string must start with \texttt{file://} appended with the absolute
path. This is typically used when the guest system use the same
operating systems as the dom0 or there is some kind of shared storage
for the images inside the dom0s.
Note that for compatibility reasons it is possible --- but not
recommended --- to leave out the scheme specification for
\texttt{file}, i.e. \texttt{file:///some/path} and \texttt{/some/path}
is equivalent.
Examples (in python):
Use kernel image which resides in the \texttt{/boot} directory:
\begin{verbatim}
xenapi.VM.create({ ...
'PV_kernel': 'file:///boot/vmlinuz-2.6.26-2-xen-686',
... })
\end{verbatim}
Use ramdisk image which resides on a (shared) nfs directory:
\begin{verbatim}
xenapi.VM.create({ ...
'PV_ramdisk': 'file:///nfs/xen/debian/5.0.1/initrd.img-2.6.26-2-xen-686'
... })
\end{verbatim}
When an image should be used which resides on the local system,
i.e. the system where the XenAPI call is send from, it is possible to
use the \texttt{data} URI scheme as described in \cite{RFC2397}. The
media-type must be set to \texttt{application/octet-stream}.
Currently only base64 encoding is supported. The URI must therefore
start with \texttt{data:application/octet-stream;base64,} followed by
the base64 encoded image.
The \texttt{xen/util/fileuri.py} provides a helper function which
takes a local filename as parameter and build up the correct URI from
this.
Examples (in python):
Use kernel image specified inline:
\begin{verbatim}
xenapi.VM.create({ ...
'PV_kernel': 'data:application/octet-stream;base64,H4Zu....'
# most of base64 encoded data is omitted
... })
\end{verbatim}
Using the utility function:
\begin{verbatim}
from xen.util.fileuri import scheme_data
xenapi.VM.create({ ...
'PV_kernel': scheme_data.create_from_file(
"/xen/guests/images/debian/5.0.1/vmlinuz-2.6.26-2-xen-686"),
... })
\end{verbatim}
Currently when using the \texttt{data} URI scheme, a temporary file is
created on the remote dom0 in the directory
\texttt{/var/run/xend/boot} which is then used for booting. When not
used any longer the file is deleted. (Therefore reading of the
\texttt{PV/kernel} or \texttt{PV/ramdisk} parameters when created with
a \texttt{data} URI scheme returns a filename to a temporary file ---
which might even not exists when querying.) This implementation might
change in the way that the data is directly used --- without the
indirection using a file. Therefore do not rely on the data resulting
from a read of a variables which was set using the \texttt{data}
scheme.
Note: a mix of different schemes for the parameters is possible; e.g.
the kernel can be specified with a \texttt{file} and the ramdisk with
the \texttt{data} URI scheme.
\subsection{RPCs associated with class: VM}
\subsubsection{RPC name:~clone}
{\bf Overview:}
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.
\noindent {\bf Signature:}
\begin{verbatim} (VM ref) clone (session_id s, VM ref vm, string new_name)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to be cloned \\ \hline
{\tt string } & new\_name & The name of the cloned VM \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM ref
}
The ID of the newly created VM.
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~start}
{\bf Overview:}
Start the specified VM. This function can only be called with the VM is in
the Halted State.
\noindent {\bf Signature:}
\begin{verbatim} void start (session_id s, VM ref vm, bool start_paused)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to start \\ \hline
{\tt bool } & start\_paused & Instantiate VM in paused state if set to true. \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}, {\tt
VM\_HVM\_REQUIRED}
\vspace{0.6cm}
\subsubsection{RPC name:~pause}
{\bf Overview:}
Pause the specified VM. This can only be called when the specified VM is in
the Running state.
\noindent {\bf Signature:}
\begin{verbatim} void pause (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to pause \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~unpause}
{\bf Overview:}
Resume the specified VM. This can only be called when the specified VM is
in the Paused state.
\noindent {\bf Signature:}
\begin{verbatim} void unpause (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to unpause \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~clean\_shutdown}
{\bf Overview:}
Attempt to cleanly shutdown the specified VM. (Note: this may not be
supported---e.g. if a guest agent is not installed).
Once shutdown has been completed perform poweroff action specified in guest
configuration.
This can only be called when the specified VM is in the Running state.
\noindent {\bf Signature:}
\begin{verbatim} void clean_shutdown (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to shutdown \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~clean\_reboot}
{\bf Overview:}
Attempt to cleanly shutdown the specified VM (Note: this may not be
supported---e.g. if a guest agent is not installed).
Once shutdown has been completed perform reboot action specified in guest
configuration.
This can only be called when the specified VM is in the Running state.
\noindent {\bf Signature:}
\begin{verbatim} void clean_reboot (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to shutdown \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~hard\_shutdown}
{\bf Overview:}
Stop executing the specified VM without attempting a clean shutdown. Then
perform poweroff action specified in VM configuration.
\noindent {\bf Signature:}
\begin{verbatim} void hard_shutdown (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to destroy \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~hard\_reboot}
{\bf Overview:}
Stop executing the specified VM without attempting a clean shutdown. Then
perform reboot action specified in VM configuration.
\noindent {\bf Signature:}
\begin{verbatim} void hard_reboot (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to reboot \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~suspend}
{\bf Overview:}
Suspend the specified VM to disk. This can only be called when the
specified VM is in the Running state.
\noindent {\bf Signature:}
\begin{verbatim} void suspend (session_id s, VM ref vm)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to suspend \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~resume}
{\bf Overview:}
Awaken the specified VM and resume it. This can only be called when the
specified VM is in the Suspended state.
\noindent {\bf Signature:}
\begin{verbatim} void resume (session_id s, VM ref vm, bool start_paused)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM to resume \\ \hline
{\tt bool } & start\_paused & Resume VM in paused state if set to true. \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~set\_VCPUs\_number\_live}
{\bf Overview:}
Set this VM's VCPUs/at\_startup value, and set the same value on the VM, if
running.
\noindent {\bf Signature:}
\begin{verbatim} void set_VCPUs_number_live (session_id s, VM ref self, int nvcpu)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & The VM \\ \hline
{\tt int } & nvcpu & The number of VCPUs \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~add\_to\_VCPUs\_params\_live}
{\bf Overview:}
Add the given key-value pair to VM.VCPUs\_params, and apply that value on
the running VM.
\noindent {\bf Signature:}
\begin{verbatim} void add_to_VCPUs_params_live (session_id s, VM ref self, string key, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & The VM \\ \hline
{\tt string } & key & The key \\ \hline
{\tt string } & value & The value \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_memory\_dynamic\_max\_live}
{\bf Overview:}
Set memory\_dynamic\_max in database and on running VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_memory_dynamic_max_live (session_id s, VM ref self, int max)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & The VM \\ \hline
{\tt int } & max & The memory\_dynamic\_max value \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_memory\_dynamic\_min\_live}
{\bf Overview:}
Set memory\_dynamic\_min in database and on running VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_memory_dynamic_min_live (session_id s, VM ref self, int min)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & The VM \\ \hline
{\tt int } & min & The memory\_dynamic\_min value \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~send\_sysrq}
{\bf Overview:}
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.
\noindent {\bf Signature:}
\begin{verbatim} void send_sysrq (session_id s, VM ref vm, string key)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM \\ \hline
{\tt string } & key & The key to send \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~send\_trigger}
{\bf Overview:}
Send the named trigger to this VM. This can only be called when the
specified VM is in the Running state.
\noindent {\bf Signature:}
\begin{verbatim} void send_trigger (session_id s, VM ref vm, string trigger)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM \\ \hline
{\tt string } & trigger & The trigger to send \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~migrate}
{\bf Overview:}
Migrate the VM to another host. This can only be called when the specified
VM is in the Running state.
\noindent {\bf Signature:}
\begin{verbatim} void migrate (session_id s, VM ref vm, string dest, bool live, (string -> string) Map options)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & vm & The VM \\ \hline
{\tt string } & dest & The destination host \\ \hline
{\tt bool } & live & Live migration \\ \hline
{\tt (string $\rightarrow$ string) Map } & options & Other parameters \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE}
\vspace{0.6cm}
\subsubsection{RPC name:~get\_all}
{\bf Overview:}
Return a list of all the VMs known to the system.
\noindent {\bf Signature:}
\begin{verbatim} ((VM ref) Set) get_all (session_id s)\end{verbatim}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(VM ref) Set
}
A list of all the IDs of all the VMs
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_uuid}
{\bf Overview:}
Get the uuid field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_uuid (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_power\_state}
{\bf Overview:}
Get the power\_state field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (vm_power_state) get_power_state (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
vm\_power\_state
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_name\_label}
{\bf Overview:}
Get the name/label field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_name_label (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_name\_label}
{\bf Overview:}
Set the name/label field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_name_label (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_name\_description}
{\bf Overview:}
Get the name/description field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_name_description (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_name\_description}
{\bf Overview:}
Set the name/description field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_name_description (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_user\_version}
{\bf Overview:}
Get the user\_version field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_user_version (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_user\_version}
{\bf Overview:}
Set the user\_version field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_user_version (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_is\_a\_template}
{\bf Overview:}
Get the is\_a\_template field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} bool get_is_a_template (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
bool
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_is\_a\_template}
{\bf Overview:}
Set the is\_a\_template field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_is_a_template (session_id s, VM ref self, bool value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt bool } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_auto\_power\_on}
{\bf Overview:}
Get the auto\_power\_on field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} bool get_auto_power_on (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
bool
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_auto\_power\_on}
{\bf Overview:}
Set the auto\_power\_on field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_auto_power_on (session_id s, VM ref self, bool value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt bool } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_suspend\_VDI}
{\bf Overview:}
Get the suspend\_VDI field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (VDI ref) get_suspend_VDI (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VDI ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_resident\_on}
{\bf Overview:}
Get the resident\_on field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (host ref) get_resident_on (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
host ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_memory\_static\_max}
{\bf Overview:}
Get the memory/static\_max field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_memory_static_max (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_memory\_static\_max}
{\bf Overview:}
Set the memory/static\_max field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_memory_static_max (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_memory\_dynamic\_max}
{\bf Overview:}
Get the memory/dynamic\_max field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_memory_dynamic_max (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_memory\_dynamic\_max}
{\bf Overview:}
Set the memory/dynamic\_max field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_memory_dynamic_max (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_memory\_dynamic\_min}
{\bf Overview:}
Get the memory/dynamic\_min field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_memory_dynamic_min (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_memory\_dynamic\_min}
{\bf Overview:}
Set the memory/dynamic\_min field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_memory_dynamic_min (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_memory\_static\_min}
{\bf Overview:}
Get the memory/static\_min field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_memory_static_min (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_memory\_static\_min}
{\bf Overview:}
Set the memory/static\_min field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_memory_static_min (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_params}
{\bf Overview:}
Get the VCPUs/params field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((string -> string) Map) get_VCPUs_params (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(string $\rightarrow$ string) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_VCPUs\_params}
{\bf Overview:}
Set the VCPUs/params field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_VCPUs_params (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~add\_to\_VCPUs\_params}
{\bf Overview:}
Add the given key-value pair to the VCPUs/params field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void add_to_VCPUs_params (session_id s, VM ref self, string key, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to add \\ \hline
{\tt string } & value & Value to add \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~remove\_from\_VCPUs\_params}
{\bf Overview:}
Remove the given key and its corresponding value from the VCPUs/params
field of the given VM. If the key is not in that Map, then do nothing.
\noindent {\bf Signature:}
\begin{verbatim} void remove_from_VCPUs_params (session_id s, VM ref self, string key)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to remove \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_max}
{\bf Overview:}
Get the VCPUs/max field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_VCPUs_max (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_VCPUs\_max}
{\bf Overview:}
Set the VCPUs/max field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_VCPUs_max (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_at\_startup}
{\bf Overview:}
Get the VCPUs/at\_startup field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_VCPUs_at_startup (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_VCPUs\_at\_startup}
{\bf Overview:}
Set the VCPUs/at\_startup field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_VCPUs_at_startup (session_id s, VM ref self, int value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt int } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_actions\_after\_shutdown}
{\bf Overview:}
Get the actions/after\_shutdown field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (on_normal_exit) get_actions_after_shutdown (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
on\_normal\_exit
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_actions\_after\_shutdown}
{\bf Overview:}
Set the actions/after\_shutdown field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_actions_after_shutdown (session_id s, VM ref self, on_normal_exit value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt on\_normal\_exit } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_actions\_after\_reboot}
{\bf Overview:}
Get the actions/after\_reboot field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (on_normal_exit) get_actions_after_reboot (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
on\_normal\_exit
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_actions\_after\_reboot}
{\bf Overview:}
Set the actions/after\_reboot field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_actions_after_reboot (session_id s, VM ref self, on_normal_exit value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt on\_normal\_exit } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_actions\_after\_crash}
{\bf Overview:}
Get the actions/after\_crash field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (on_crash_behaviour) get_actions_after_crash (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
on\_crash\_behaviour
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_actions\_after\_crash}
{\bf Overview:}
Set the actions/after\_crash field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_actions_after_crash (session_id s, VM ref self, on_crash_behaviour value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt on\_crash\_behaviour } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_consoles}
{\bf Overview:}
Get the consoles field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((console ref) Set) get_consoles (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(console ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VIFs}
{\bf Overview:}
Get the VIFs field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((VIF ref) Set) get_VIFs (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(VIF ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VBDs}
{\bf Overview:}
Get the VBDs field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((VBD ref) Set) get_VBDs (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(VBD ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_crash\_dumps}
{\bf Overview:}
Get the crash\_dumps field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((crashdump ref) Set) get_crash_dumps (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(crashdump ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VTPMs}
{\bf Overview:}
Get the VTPMs field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((VTPM ref) Set) get_VTPMs (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(VTPM ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_DPCIs}
{\bf Overview:}
Get the DPCIs field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((DPCI ref) Set) get_DPCIs (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(DPCI ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_DSCSIs}
{\bf Overview:}
Get the DSCSIs field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((DSCSI ref) Set) get_DSCSIs (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(DSCSI ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_DSCSI\_HBAs}
{\bf Overview:}
Get the DSCSI\_HBAs field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((DSCSI_HBA ref) Set) get_DSCSI_HBAs (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(DSCSI\_HBA ref) Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_PV\_bootloader}
{\bf Overview:}
Get the PV/bootloader field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_PV_bootloader (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_PV\_bootloader}
{\bf Overview:}
Set the PV/bootloader field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_PV_bootloader (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_PV\_kernel}
{\bf Overview:}
Get the PV/kernel field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_PV_kernel (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_PV\_kernel}
{\bf Overview:}
Set the PV/kernel field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_PV_kernel (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_PV\_ramdisk}
{\bf Overview:}
Get the PV/ramdisk field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_PV_ramdisk (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_PV\_ramdisk}
{\bf Overview:}
Set the PV/ramdisk field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_PV_ramdisk (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_PV\_args}
{\bf Overview:}
Get the PV/args field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_PV_args (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_PV\_args}
{\bf Overview:}
Set the PV/args field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_PV_args (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_PV\_bootloader\_args}
{\bf Overview:}
Get the PV/bootloader\_args field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_PV_bootloader_args (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_PV\_bootloader\_args}
{\bf Overview:}
Set the PV/bootloader\_args field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_PV_bootloader_args (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_HVM\_boot\_policy}
{\bf Overview:}
Get the HVM/boot\_policy field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_HVM_boot_policy (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_HVM\_boot\_policy}
{\bf Overview:}
Set the HVM/boot\_policy field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_HVM_boot_policy (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_HVM\_boot\_params}
{\bf Overview:}
Get the HVM/boot\_params field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((string -> string) Map) get_HVM_boot_params (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(string $\rightarrow$ string) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_HVM\_boot\_params}
{\bf Overview:}
Set the HVM/boot\_params field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_HVM_boot_params (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~add\_to\_HVM\_boot\_params}
{\bf Overview:}
Add the given key-value pair to the HVM/boot\_params field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void add_to_HVM_boot_params (session_id s, VM ref self, string key, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to add \\ \hline
{\tt string } & value & Value to add \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~remove\_from\_HVM\_boot\_params}
{\bf Overview:}
Remove the given key and its corresponding value from the HVM/boot\_params
field of the given VM. If the key is not in that Map, then do nothing.
\noindent {\bf Signature:}
\begin{verbatim} void remove_from_HVM_boot_params (session_id s, VM ref self, string key)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to remove \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_platform}
{\bf Overview:}
Get the platform field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((string -> string) Map) get_platform (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(string $\rightarrow$ string) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_platform}
{\bf Overview:}
Set the platform field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_platform (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~add\_to\_platform}
{\bf Overview:}
Add the given key-value pair to the platform field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void add_to_platform (session_id s, VM ref self, string key, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to add \\ \hline
{\tt string } & value & Value to add \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~remove\_from\_platform}
{\bf Overview:}
Remove the given key and its corresponding value from the platform field of
the given VM. If the key is not in that Map, then do nothing.
\noindent {\bf Signature:}
\begin{verbatim} void remove_from_platform (session_id s, VM ref self, string key)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to remove \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_PCI\_bus}
{\bf Overview:}
Get the PCI\_bus field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_PCI_bus (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_PCI\_bus}
{\bf Overview:}
Set the PCI\_bus field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_PCI_bus (session_id s, VM ref self, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_other\_config}
{\bf Overview:}
Get the other\_config field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((string -> string) Map) get_other_config (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(string $\rightarrow$ string) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_other\_config}
{\bf Overview:}
Set the other\_config field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void set_other_config (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~add\_to\_other\_config}
{\bf Overview:}
Add the given key-value pair to the other\_config field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} void add_to_other_config (session_id s, VM ref self, string key, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to add \\ \hline
{\tt string } & value & Value to add \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~remove\_from\_other\_config}
{\bf Overview:}
Remove the given key and its corresponding value from the other\_config
field of the given VM. If the key is not in that Map, then do nothing.
\noindent {\bf Signature:}
\begin{verbatim} void remove_from_other_config (session_id s, VM ref self, string key)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & key & Key to remove \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_domid}
{\bf Overview:}
Get the domid field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} int get_domid (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_is\_control\_domain}
{\bf Overview:}
Get the is\_control\_domain field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} bool get_is_control_domain (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
bool
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_metrics}
{\bf Overview:}
Get the metrics field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (VM_metrics ref) get_metrics (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM\_metrics ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_guest\_metrics}
{\bf Overview:}
Get the guest\_metrics field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (VM_guest_metrics ref) get_guest_metrics (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM\_guest\_metrics ref
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_security\_label}
{\bf Overview:}
Get the security label field of the given VM. Refer to the XSPolicy class
for the format of the security label.
\noindent {\bf Signature:}
\begin{verbatim} string get_security_label (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_security\_label}
{\bf Overview:}
Set the security label field of the given VM. Refer to the XSPolicy class
for the format of the security label.
\noindent {\bf Signature:}
\begin{verbatim} int set_security_label (session_id s, VM ref self, string
security_label, string old_label)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string } & security\_label & security label for the VM \\ \hline
{\tt string } & old\_label & Label value that the security label \\
& & must currently have for the change to succeed.\\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
Returns the ssidref in case of an VM that is currently running or
paused, zero in case of a dormant VM (halted, suspended).
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt SECURITY\_ERROR}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~create}
{\bf Overview:}
Create a new VM instance, and return its handle.
\noindent {\bf Signature:}
\begin{verbatim} (VM ref) create (session_id s, VM record args)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM record } & args & All constructor arguments \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM ref
}
reference to the newly created object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~destroy}
{\bf Overview:}
Destroy the specified VM. The VM is completely removed from the system.
This function can only be called when the VM is in the Halted State.
\noindent {\bf Signature:}
\begin{verbatim} void destroy (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_by\_uuid}
{\bf Overview:}
Get a reference to the VM instance with the specified UUID.
\noindent {\bf Signature:}
\begin{verbatim} (VM ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & uuid & UUID of object to return \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM ref
}
reference to the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_record}
{\bf Overview:}
Get a record containing the current state of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} (VM record) get_record (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM record
}
all fields from the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_by\_name\_label}
{\bf Overview:}
Get all the VM instances with the given label.
\noindent {\bf Signature:}
\begin{verbatim} ((VM ref) Set) get_by_name_label (session_id s, string label)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & label & label of object to return \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(VM ref) Set
}
references to objects with match names
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_cpu\_pool}
{\bf Overview:}
Get the cpu\_pool field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} ((cpu_pool ref) Set) get_cpu_pool (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(cpu\_pool ref) Set
}
references to cpu\_pool objects.
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_pool\_name}
{\bf Overview:}
Get the pool\_name field of the given VM.
\noindent {\bf Signature:}
\begin{verbatim} string get_cpu_pool (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
name of cpu pool to use
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~cpu\_pool\_migrate}
{\bf Overview:}
Migrate the VM to another cpu\_pool.
\noindent {\bf Signature:}
\begin{verbatim} void cpu_pool_migrate (session_id s, VM ref self, cpu_pool ref pool)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt cpu\_pool ref} & pool & reference to new cpu\_pool \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\noindent{\bf Possible Error Codes:} {\tt POOL\_BAD\_STATE, VM\_BAD\_POWER\_STATE}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~set\_pool\_name}
{\bf Overview:}
Set cpu pool name to use for next activation.
\noindent {\bf Signature:}
\begin{verbatim} void set_pool_name (session_id s, VM ref self, string pool\_name)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM ref } & self & reference to the object \\ \hline
{\tt string} & pool\_name & New pool name \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
void
}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{1cm}
\newpage
\section{Class: VM\_metrics}
\subsection{Fields for class: VM\_metrics}
\begin{longtable}{|lllp{0.38\textwidth}|}
\hline
\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VM\_metrics} \\
\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
The metrics associated with a VM.}} \\
\hline
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\
$\mathit{RO}_\mathit{run}$ & {\tt memory/actual} & int & Guest's actual memory (bytes) \\
$\mathit{RO}_\mathit{run}$ & {\tt VCPUs/number} & int & Current number of VCPUs \\
$\mathit{RO}_\mathit{run}$ & {\tt VCPUs/utilisation} & (int $\rightarrow$ float) Map & Utilisation for all of guest's current VCPUs \\
$\mathit{RO}_\mathit{run}$ & {\tt VCPUs/CPU} & (int $\rightarrow$ int) Map & VCPU to PCPU map \\
$\mathit{RO}_\mathit{run}$ & {\tt VCPUs/params} & (string $\rightarrow$ string) Map & The live equivalent to VM.VCPUs\_params \\
$\mathit{RO}_\mathit{run}$ & {\tt VCPUs/flags} & (int $\rightarrow$ string Set) Map & CPU flags (blocked,online,running) \\
$\mathit{RO}_\mathit{run}$ & {\tt state} & string Set & The state of the guest, eg blocked, dying etc \\
$\mathit{RO}_\mathit{run}$ & {\tt start\_time} & datetime & Time at which this VM was last booted \\
$\mathit{RO}_\mathit{run}$ & {\tt last\_updated} & datetime & Time at which this information was last updated \\
\hline
\end{longtable}
\subsection{RPCs associated with class: VM\_metrics}
\subsubsection{RPC name:~get\_all}
{\bf Overview:}
Return a list of all the VM\_metrics instances known to the system.
\noindent {\bf Signature:}
\begin{verbatim} ((VM_metrics ref) Set) get_all (session_id s)\end{verbatim}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(VM\_metrics ref) Set
}
references to all objects
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_uuid}
{\bf Overview:}
Get the uuid field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} string get_uuid (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_memory\_actual}
{\bf Overview:}
Get the memory/actual field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} int get_memory_actual (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_number}
{\bf Overview:}
Get the VCPUs/number field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} int get_VCPUs_number (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
int
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_utilisation}
{\bf Overview:}
Get the VCPUs/utilisation field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} ((int -> float) Map) get_VCPUs_utilisation (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(int $\rightarrow$ float) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_CPU}
{\bf Overview:}
Get the VCPUs/CPU field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} ((int -> int) Map) get_VCPUs_CPU (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(int $\rightarrow$ int) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_params}
{\bf Overview:}
Get the VCPUs/params field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} ((string -> string) Map) get_VCPUs_params (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(string $\rightarrow$ string) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_VCPUs\_flags}
{\bf Overview:}
Get the VCPUs/flags field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} ((int -> string Set) Map) get_VCPUs_flags (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
(int $\rightarrow$ string Set) Map
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_state}
{\bf Overview:}
Get the state field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} (string Set) get_state (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
string Set
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_start\_time}
{\bf Overview:}
Get the start\_time field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} datetime get_start_time (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
datetime
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_last\_updated}
{\bf Overview:}
Get the last\_updated field of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} datetime get_last_updated (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
datetime
}
value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_by\_uuid}
{\bf Overview:}
Get a reference to the VM\_metrics instance with the specified UUID.
\noindent {\bf Signature:}
\begin{verbatim} (VM_metrics ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt string } & uuid & UUID of object to return \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM\_metrics ref
}
reference to the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\subsubsection{RPC name:~get\_record}
{\bf Overview:}
Get a record containing the current state of the given VM\_metrics.
\noindent {\bf Signature:}
\begin{verbatim} (VM_metrics record) get_record (session_id s, VM_metrics ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\begin{tabular}{|c|c|p{7cm}|}
\hline
{\bf type} & {\bf name} & {\bf description} \\ \hline
{\tt VM\_metrics ref } & self & reference to the object \\ \hline
\end{tabular}
\vspace{0.3cm}
\noindent {\bf Return Type:}
{\tt
VM\_metrics record
}
all fields from the object
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{1cm}
\newpage
\section{Class: VM\_guest\_metrics}
\subsection{Fields for class: VM\_guest\_metrics}
\begin{longtable}{|lllp{0.38\textwidth}|}
\hline
\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VM\_guest\_metrics} \\
\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
The metrics reported by the guest (as opposed to inferred from outside).}} \\
\hline
Quals & Field & Type & Description \\
\hline
$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\
$\mathit{RO}_\mathit{run}$ & {\tt os\_version} & (string $\rightarrow$ string) Map & version of the OS \\
$\mathit{RO}_\mathit{run}$ & {\tt PV\_drivers\_version} & (string $\rightarrow$ string) Map & version of the PV drivers \\
$\mathit{RO}_\mathit{run}$ & {\tt memory} & (string $\rightarrow$ string) Map & free/used/total memory \\
$\mathit{RO}_\mathit{run}$ & {\tt disks} & (string $\rightarrow$ string) Map & disk configuration/free space \\
$\mathit{RO}_\mathit{run}$ & {\tt networks} & (string $\rightarrow$ string) Map & network configuration \\
$\mathit{RO}_\mathit{run}$ & {\tt other} & (string $\rightarrow$ string) Map & anything else \\
$\mathit{RO}_\mathit{run}$ & {\tt last\_updated} & datetime & Time at which this information was last updated \\
\hline
\end{longtable}
\subsection{RPCs associated with class: VM\_guest\_metrics}