[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Added documentation and C bindings for VM.migrate call.



# HG changeset patch
# User ewan@xxxxxxxxxxxxxxxxxxxxx
# Date 1176754353 14400
# Node ID 765ac13f425be49ba1479a9926ef6f1f4bbc8664
# Parent  ed29a1d721f83424ba097385fe50204b9a46de44
Added documentation and C bindings for VM.migrate call.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/xenapi-datamodel.tex |   41 ++++++++++++++++++++++++++++++++++++++
 tools/libxen/include/xen_vm.h     |    8 +++++++
 tools/libxen/src/xen_vm.c         |   20 ++++++++++++++++++
 3 files changed, 69 insertions(+)

diff -r ed29a1d721f8 -r 765ac13f425b docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Mon Apr 16 16:10:39 2007 -0400
+++ b/docs/xen-api/xenapi-datamodel.tex Mon Apr 16 16:12:33 2007 -0400
@@ -1738,6 +1738,47 @@ void
 \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:} 
diff -r ed29a1d721f8 -r 765ac13f425b tools/libxen/include/xen_vm.h
--- a/tools/libxen/include/xen_vm.h     Mon Apr 16 16:10:39 2007 -0400
+++ b/tools/libxen/include/xen_vm.h     Mon Apr 16 16:12:33 2007 -0400
@@ -877,6 +877,14 @@ xen_vm_send_trigger(xen_session *session
 
 
 /**
+ * Migrate the VM to another host.  This can only be called when the
+ * specified VM is in the Running state.
+ */
+extern bool
+xen_vm_migrate(xen_session *session, xen_vm vm, char *dest, bool live, 
xen_string_string_map *options);
+
+
+/**
  * Return a list of all the VMs known to the system.
  */
 extern bool
diff -r ed29a1d721f8 -r 765ac13f425b tools/libxen/src/xen_vm.c
--- a/tools/libxen/src/xen_vm.c Mon Apr 16 16:10:39 2007 -0400
+++ b/tools/libxen/src/xen_vm.c Mon Apr 16 16:12:33 2007 -0400
@@ -1692,6 +1692,26 @@ xen_vm_send_trigger(xen_session *session
 
 
 bool
+xen_vm_migrate(xen_session *session, xen_vm vm, char *dest, bool live, 
xen_string_string_map *options)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vm },
+            { .type = &abstract_type_string,
+              .u.string_val = dest },
+            { .type = &abstract_type_bool,
+              .u.bool_val = live },
+            { .type = &abstract_type_string_string_map,
+              .u.set_val = (arbitrary_set *)options }
+        };
+
+    xen_call_(session, "VM.migrate", param_values, 4, NULL, NULL);
+    return session->ok;
+}
+
+
+bool
 xen_vm_get_all(xen_session *session, struct xen_vm_set **result)
 {
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.