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

[libvirt] [PATCH 4/6] Remote driver implementation of new migration API



* src/remote/remote_protocol.x: Define wire protocol for migration
  protocol v3
* daemon/remote.c: Server side dispatch
* src/remote/remote_driver.c: Client side serialization
* src/remote/remote_protocol.c, src/remote/remote_protocol.h,
  daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
  daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h:
  Re-generate files
---
 daemon/remote.c                     |  282 ++++++++++++++++++++++++++
 daemon/remote_dispatch_args.h       |    6 +
 daemon/remote_dispatch_prototypes.h |   48 +++++
 daemon/remote_dispatch_ret.h        |    5 +
 daemon/remote_dispatch_table.h      |   30 +++
 src/remote/remote_driver.c          |  371 ++++++++++++++++++++++++++++++++++-
 src/remote/remote_protocol.c        |  163 +++++++++++++++
 src/remote/remote_protocol.h        |  140 +++++++++++++
 src/remote/remote_protocol.x        |   79 ++++++++-
 9 files changed, 1117 insertions(+), 7 deletions(-)

diff --git a/daemon/remote.c b/daemon/remote.c
index d53b466..6592c85 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -72,6 +72,7 @@ static virStorageVolPtr get_nonnull_storage_vol (virConnectPtr conn, remote_nonn
 static virSecretPtr get_nonnull_secret (virConnectPtr conn, remote_nonnull_secret secret);
 static virNWFilterPtr get_nonnull_nwfilter (virConnectPtr conn, remote_nonnull_nwfilter nwfilter);
 static virDomainSnapshotPtr get_nonnull_domain_snapshot (virDomainPtr domain, remote_nonnull_domain_snapshot snapshot);
+static int make_domain (remote_domain *dom_dst, virDomainPtr dom_src);
 static void make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src);
 static void make_nonnull_network (remote_nonnull_network *net_dst, virNetworkPtr net_src);
 static void make_nonnull_interface (remote_nonnull_interface *interface_dst, virInterfacePtr interface_src);
@@ -7012,6 +7013,272 @@ remoteDispatchDomainOpenConsole(struct qemud_server *server ATTRIBUTE_UNUSED,
 }
 
 
+static int
+remoteDispatchDomainMigrateBegin3(struct qemud_server *server ATTRIBUTE_UNUSED,
+                                  struct qemud_client *client ATTRIBUTE_UNUSED,
+                                  virConnectPtr conn,
+                                  remote_message_header *hdr ATTRIBUTE_UNUSED,
+                                  remote_error *rerr,
+                                  remote_domain_migrate_begin3_args *args,
+                                  remote_domain_migrate_begin3_ret *ret)
+{
+    char *xml = NULL;
+    virDomainPtr dom;
+    char *dname;
+    char *cookieout = NULL;
+    int cookieoutlen = 0;
+
+    dom = get_nonnull_domain (conn, args->dom);
+    if (dom == NULL) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    dname = args->dname == NULL ? NULL : *args->dname;
+
+    xml = virDomainMigrateBegin3(dom,
+                                 &cookieout, &cookieoutlen,
+                                 args->flags, dname, args->resource);
+    virDomainFree(dom);
+    if (xml == NULL) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    /* remoteDispatchClientRequest will free cookie and
+     * the xml string if there is one.
+     */
+    ret->cookie_out.cookie_out_len = cookieoutlen;
+    ret->cookie_out.cookie_out_val = cookieout;
+    ret->xml = xml;
+
+    return 0;
+}
+
+
+static int
+remoteDispatchDomainMigratePrepare3(struct qemud_server *server ATTRIBUTE_UNUSED,
+                                    struct qemud_client *client ATTRIBUTE_UNUSED,
+                                    virConnectPtr conn,
+                                    remote_message_header *hdr ATTRIBUTE_UNUSED,
+                                    remote_error *rerr,
+                                    remote_domain_migrate_prepare3_args *args,
+                                    remote_domain_migrate_prepare3_ret *ret)
+{
+    int r;
+    char *cookieout = NULL;
+    int cookieoutlen = 0;
+    char *uri_in;
+    char **uri_out;
+    char *dname;
+    CHECK_CONN (client);
+
+    uri_in = args->uri_in == NULL ? NULL : *args->uri_in;
+    dname = args->dname == NULL ? NULL : *args->dname;
+
+    /* Wacky world of XDR ... */
+    if (VIR_ALLOC(uri_out) < 0) {
+        remoteDispatchOOMError(rerr);
+        return -1;
+    }
+
+    r = virDomainMigratePrepare3(conn,
+                                 args->cookie_in.cookie_in_val,
+                                 args->cookie_in.cookie_in_len,
+                                 &cookieout, &cookieoutlen,
+                                 uri_in, uri_out,
+                                 args->flags, dname, args->resource,
+                                 args->dom_xml);
+    if (r == -1) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    /* remoteDispatchClientRequest will free cookie, uri_out and
+     * the string if there is one.
+     */
+    ret->cookie_out.cookie_out_len = cookieoutlen;
+    ret->cookie_out.cookie_out_val = cookieout;
+    ret->uri_out = *uri_out == NULL ? NULL : uri_out;
+
+    return 0;
+}
+
+static int
+remoteDispatchDomainMigratePrepareTunnel3(struct qemud_server *server ATTRIBUTE_UNUSED,
+                                          struct qemud_client *client,
+                                          virConnectPtr conn,
+                                          remote_message_header *hdr,
+                                          remote_error *rerr,
+                                          remote_domain_migrate_prepare_tunnel3_args *args,
+                                          remote_domain_migrate_prepare_tunnel3_ret *ret)
+{
+    int r;
+    char *dname;
+    char *cookieout = NULL;
+    int cookieoutlen = 0;
+    struct qemud_client_stream *stream;
+    CHECK_CONN (client);
+
+    dname = args->dname == NULL ? NULL : *args->dname;
+
+    stream = remoteCreateClientStream(conn, hdr);
+    if (!stream) {
+        remoteDispatchOOMError(rerr);
+        return -1;
+    }
+
+    r = virDomainMigratePrepareTunnel3(conn, stream->st,
+                                       args->cookie_in.cookie_in_val,
+                                       args->cookie_in.cookie_in_len,
+                                       &cookieout, &cookieoutlen,
+                                       args->flags, dname, args->resource,
+                                       args->dom_xml);
+    if (r == -1) {
+        remoteFreeClientStream(client, stream);
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    if (remoteAddClientStream(client, stream, 0) < 0) {
+        remoteDispatchConnError(rerr, conn);
+        virStreamAbort(stream->st);
+        remoteFreeClientStream(client, stream);
+        VIR_FREE(cookieout);
+        return -1;
+    }
+
+    /* remoteDispatchClientRequest will free cookie
+     */
+    ret->cookie_out.cookie_out_len = cookieoutlen;
+    ret->cookie_out.cookie_out_val = cookieout;
+
+    return 0;
+}
+
+static int
+remoteDispatchDomainMigratePerform3(struct qemud_server *server ATTRIBUTE_UNUSED,
+                                    struct qemud_client *client ATTRIBUTE_UNUSED,
+                                    virConnectPtr conn,
+                                    remote_message_header *hdr ATTRIBUTE_UNUSED,
+                                    remote_error *rerr,
+                                    remote_domain_migrate_perform3_args *args,
+                                    remote_domain_migrate_perform3_ret *ret)
+{
+    int r;
+    virDomainPtr dom;
+    char *dname;
+    char *cookieout = NULL;
+    int cookieoutlen = 0;
+
+    dom = get_nonnull_domain (conn, args->dom);
+    if (dom == NULL) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    dname = args->dname == NULL ? NULL : *args->dname;
+
+    r = virDomainMigratePerform3(dom,
+                                 args->cookie_in.cookie_in_val,
+                                 args->cookie_in.cookie_in_len,
+                                 &cookieout, &cookieoutlen,
+                                 args->uri,
+                                 args->flags, dname, args->resource);
+    virDomainFree (dom);
+    if (r == -1) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    /* remoteDispatchClientRequest will free cookie
+     */
+    ret->cookie_out.cookie_out_len = cookieoutlen;
+    ret->cookie_out.cookie_out_val = cookieout;
+
+    return 0;
+}
+
+
+static int
+remoteDispatchDomainMigrateFinish3(struct qemud_server *server ATTRIBUTE_UNUSED,
+                                   struct qemud_client *client ATTRIBUTE_UNUSED,
+                                   virConnectPtr conn,
+                                   remote_message_header *hdr ATTRIBUTE_UNUSED,
+                                   remote_error *rerr,
+                                   remote_domain_migrate_finish3_args *args,
+                                   remote_domain_migrate_finish3_ret *ret)
+{
+    virDomainPtr ddom = NULL;
+    char *cookieout = NULL;
+    int cookieoutlen = 0;
+    int rv;
+    CHECK_CONN (client);
+
+    rv = virDomainMigrateFinish3(conn, args->dname,
+                                 args->cookie_in.cookie_in_val,
+                                 args->cookie_in.cookie_in_len,
+                                 &cookieout, &cookieoutlen,
+                                 args->uri,
+                                 args->flags,
+                                 args->cancelled,
+                                 &ddom);
+    if (rv < 0) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    if (ddom) {
+        if (make_domain(&ret->ddom, ddom) < 0) {
+            remoteDispatchConnError(rerr, conn);
+            virDomainFree(ddom);
+            VIR_FREE(cookieout);
+            return -1;
+        }
+        virDomainFree(ddom);
+    }
+
+    /* remoteDispatchClientRequest will free cookie
+     */
+    ret->cookie_out.cookie_out_len = cookieoutlen;
+    ret->cookie_out.cookie_out_val = cookieout;
+
+    return 0;
+}
+
+
+static int
+remoteDispatchDomainMigrateConfirm3(struct qemud_server *server ATTRIBUTE_UNUSED,
+                                    struct qemud_client *client ATTRIBUTE_UNUSED,
+                                    virConnectPtr conn,
+                                    remote_message_header *hdr ATTRIBUTE_UNUSED,
+                                    remote_error *rerr,
+                                    remote_domain_migrate_confirm3_args *args,
+                                    void *ret ATTRIBUTE_UNUSED)
+{
+    int r;
+    virDomainPtr dom;
+
+    dom = get_nonnull_domain (conn, args->dom);
+    if (dom == NULL) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    r = virDomainMigrateConfirm3(dom,
+                                 args->cookie_in.cookie_in_val,
+                                 args->cookie_in.cookie_in_len,
+                                 args->flags, args->cancelled);
+    virDomainFree (dom);
+    if (r == -1) {
+        remoteDispatchConnError(rerr, conn);
+        return -1;
+    }
+
+    return 0;
+}
+
+
 /*----- Helpers. -----*/
 
 /* get_nonnull_domain and get_nonnull_network turn an on-wire
@@ -7077,6 +7344,21 @@ get_nonnull_domain_snapshot (virDomainPtr domain, remote_nonnull_domain_snapshot
 }
 
 /* Make remote_nonnull_domain and remote_nonnull_network. */
+static int
+make_domain (remote_domain *dom_dst, virDomainPtr dom_src)
+{
+    remote_domain rdom;
+    if (VIR_ALLOC(rdom) < 0)
+        return -1;
+
+    rdom->id = dom_src->id;
+    rdom->name = strdup(dom_src->name);
+    memcpy(rdom->uuid, dom_src->uuid, VIR_UUID_BUFLEN);
+
+    *dom_dst = rdom;
+    return 0;
+}
+
 static void
 make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src)
 {
diff --git a/daemon/remote_dispatch_args.h b/daemon/remote_dispatch_args.h
index 57962d1..6603da4 100644
--- a/daemon/remote_dispatch_args.h
+++ b/daemon/remote_dispatch_args.h
@@ -172,3 +172,9 @@
     remote_domain_open_console_args val_remote_domain_open_console_args;
     remote_domain_is_updated_args val_remote_domain_is_updated_args;
     remote_get_sysinfo_args val_remote_get_sysinfo_args;
+    remote_domain_migrate_begin3_args val_remote_domain_migrate_begin3_args;
+    remote_domain_migrate_prepare3_args val_remote_domain_migrate_prepare3_args;
+    remote_domain_migrate_prepare_tunnel3_args val_remote_domain_migrate_prepare_tunnel3_args;
+    remote_domain_migrate_perform3_args val_remote_domain_migrate_perform3_args;
+    remote_domain_migrate_finish3_args val_remote_domain_migrate_finish3_args;
+    remote_domain_migrate_confirm3_args val_remote_domain_migrate_confirm3_args;
diff --git a/daemon/remote_dispatch_prototypes.h b/daemon/remote_dispatch_prototypes.h
index e59701a..602a052 100644
--- a/daemon/remote_dispatch_prototypes.h
+++ b/daemon/remote_dispatch_prototypes.h
@@ -418,6 +418,22 @@ static int remoteDispatchDomainMemoryStats(
     remote_error *err,
     remote_domain_memory_stats_args *args,
     remote_domain_memory_stats_ret *ret);
+static int remoteDispatchDomainMigrateBegin3(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_message_header *hdr,
+    remote_error *err,
+    remote_domain_migrate_begin3_args *args,
+    remote_domain_migrate_begin3_ret *ret);
+static int remoteDispatchDomainMigrateConfirm3(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_message_header *hdr,
+    remote_error *err,
+    remote_domain_migrate_confirm3_args *args,
+    void *ret);
 static int remoteDispatchDomainMigrateFinish(
     struct qemud_server *server,
     struct qemud_client *client,
@@ -434,6 +450,14 @@ static int remoteDispatchDomainMigrateFinish2(
     remote_error *err,
     remote_domain_migrate_finish2_args *args,
     remote_domain_migrate_finish2_ret *ret);
+static int remoteDispatchDomainMigrateFinish3(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_message_header *hdr,
+    remote_error *err,
+    remote_domain_migrate_finish3_args *args,
+    remote_domain_migrate_finish3_ret *ret);
 static int remoteDispatchDomainMigratePerform(
     struct qemud_server *server,
     struct qemud_client *client,
@@ -442,6 +466,14 @@ static int remoteDispatchDomainMigratePerform(
     remote_error *err,
     remote_domain_migrate_perform_args *args,
     void *ret);
+static int remoteDispatchDomainMigratePerform3(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_message_header *hdr,
+    remote_error *err,
+    remote_domain_migrate_perform3_args *args,
+    remote_domain_migrate_perform3_ret *ret);
 static int remoteDispatchDomainMigratePrepare(
     struct qemud_server *server,
     struct qemud_client *client,
@@ -458,6 +490,14 @@ static int remoteDispatchDomainMigratePrepare2(
     remote_error *err,
     remote_domain_migrate_prepare2_args *args,
     remote_domain_migrate_prepare2_ret *ret);
+static int remoteDispatchDomainMigratePrepare3(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_message_header *hdr,
+    remote_error *err,
+    remote_domain_migrate_prepare3_args *args,
+    remote_domain_migrate_prepare3_ret *ret);
 static int remoteDispatchDomainMigratePrepareTunnel(
     struct qemud_server *server,
     struct qemud_client *client,
@@ -466,6 +506,14 @@ static int remoteDispatchDomainMigratePrepareTunnel(
     remote_error *err,
     remote_domain_migrate_prepare_tunnel_args *args,
     void *ret);
+static int remoteDispatchDomainMigratePrepareTunnel3(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_message_header *hdr,
+    remote_error *err,
+    remote_domain_migrate_prepare_tunnel3_args *args,
+    remote_domain_migrate_prepare_tunnel3_ret *ret);
 static int remoteDispatchDomainMigrateSetMaxDowntime(
     struct qemud_server *server,
     struct qemud_client *client,
diff --git a/daemon/remote_dispatch_ret.h b/daemon/remote_dispatch_ret.h
index 78e5469..f793ac2 100644
--- a/daemon/remote_dispatch_ret.h
+++ b/daemon/remote_dispatch_ret.h
@@ -139,3 +139,8 @@
     remote_domain_get_vcpus_flags_ret val_remote_domain_get_vcpus_flags_ret;
     remote_domain_is_updated_ret val_remote_domain_is_updated_ret;
     remote_get_sysinfo_ret val_remote_get_sysinfo_ret;
+    remote_domain_migrate_begin3_ret val_remote_domain_migrate_begin3_ret;
+    remote_domain_migrate_prepare3_ret val_remote_domain_migrate_prepare3_ret;
+    remote_domain_migrate_prepare_tunnel3_ret val_remote_domain_migrate_prepare_tunnel3_ret;
+    remote_domain_migrate_perform3_ret val_remote_domain_migrate_perform3_ret;
+    remote_domain_migrate_finish3_ret val_remote_domain_migrate_finish3_ret;
diff --git a/daemon/remote_dispatch_table.h b/daemon/remote_dispatch_table.h
index 5d27390..e01aec7 100644
--- a/daemon/remote_dispatch_table.h
+++ b/daemon/remote_dispatch_table.h
@@ -1022,3 +1022,33 @@
     .args_filter = (xdrproc_t) xdr_remote_get_sysinfo_args,
     .ret_filter = (xdrproc_t) xdr_remote_get_sysinfo_ret,
 },
+{   /* DomainMigrateBegin3 => 204 */
+    .fn = (dispatch_fn) remoteDispatchDomainMigrateBegin3,
+    .args_filter = (xdrproc_t) xdr_remote_domain_migrate_begin3_args,
+    .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_begin3_ret,
+},
+{   /* DomainMigratePrepare3 => 205 */
+    .fn = (dispatch_fn) remoteDispatchDomainMigratePrepare3,
+    .args_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare3_args,
+    .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare3_ret,
+},
+{   /* DomainMigratePrepareTunnel3 => 206 */
+    .fn = (dispatch_fn) remoteDispatchDomainMigratePrepareTunnel3,
+    .args_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_args,
+    .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_ret,
+},
+{   /* DomainMigratePerform3 => 207 */
+    .fn = (dispatch_fn) remoteDispatchDomainMigratePerform3,
+    .args_filter = (xdrproc_t) xdr_remote_domain_migrate_perform3_args,
+    .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_perform3_ret,
+},
+{   /* DomainMigrateFinish3 => 208 */
+    .fn = (dispatch_fn) remoteDispatchDomainMigrateFinish3,
+    .args_filter = (xdrproc_t) xdr_remote_domain_migrate_finish3_args,
+    .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_finish3_ret,
+},
+{   /* DomainMigrateConfirm3 => 209 */
+    .fn = (dispatch_fn) remoteDispatchDomainMigrateConfirm3,
+    .args_filter = (xdrproc_t) xdr_remote_domain_migrate_confirm3_args,
+    .ret_filter = (xdrproc_t) xdr_void,
+},
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 464222c..3b36cc5 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -243,6 +243,7 @@ static int remoteAuthPolkit (virConnectPtr conn, struct private_data *priv, int
     virReportErrorHelper(NULL, VIR_FROM_REMOTE, code, __FILE__,   \
                          __FUNCTION__, __LINE__, __VA_ARGS__)
 
+static virDomainPtr get_domain (virConnectPtr conn, remote_domain domain);
 static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
 static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
 static virNWFilterPtr get_nonnull_nwfilter (virConnectPtr conn, remote_nonnull_nwfilter nwfilter);
@@ -3264,6 +3265,7 @@ error:
     goto done;
 }
 
+
 static virDomainPtr
 remoteDomainMigrateFinish2 (virConnectPtr dconn,
                             const char *dname,
@@ -3301,6 +3303,7 @@ done:
     return ddom;
 }
 
+
 static int
 remoteListDefinedDomains (virConnectPtr conn, char **const names, int maxnames)
 {
@@ -9439,6 +9442,346 @@ done:
     return rv;
 }
 
+
+static char *
+remoteDomainMigrateBegin3(virDomainPtr domain,
+                          char **cookieout,
+                          int *cookieoutlen,
+                          unsigned long flags,
+                          const char *dname,
+                          unsigned long resource)
+{
+    char *rv = NULL;
+    remote_domain_migrate_begin3_args args;
+    remote_domain_migrate_begin3_ret ret;
+    struct private_data *priv = domain->conn->privateData;
+
+    remoteDriverLock(priv);
+
+    memset(&args, 0, sizeof(args));
+    memset(&ret, 0, sizeof(ret));
+
+    make_nonnull_domain (&args.dom, domain);
+    args.flags = flags;
+    args.dname = dname == NULL ? NULL : (char **) &dname;
+    args.resource = resource;
+
+    if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3,
+              (xdrproc_t) xdr_remote_domain_migrate_begin3_args, (char *) &args,
+              (xdrproc_t) xdr_remote_domain_migrate_begin3_ret, (char *) &ret) == -1)
+        goto done;
+
+    if (ret.cookie_out.cookie_out_len > 0) {
+        if (!cookieout || !cookieoutlen) {
+            remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
+                        _("caller ignores cookieout or cookieoutlen"));
+            goto error;
+        }
+        *cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
+        *cookieoutlen = ret.cookie_out.cookie_out_len;
+    }
+
+    rv = ret.xml; /* caller frees */
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+
+error:
+    VIR_FREE(ret.cookie_out.cookie_out_val);
+    goto done;
+}
+
+
+static int
+remoteDomainMigratePrepare3(virConnectPtr dconn,
+                            const char *cookiein,
+                            int cookieinlen,
+                            char **cookieout,
+                            int *cookieoutlen,
+                            const char *uri_in,
+                            char **uri_out,
+                            unsigned long flags,
+                            const char *dname,
+                            unsigned long resource,
+                            const char *dom_xml)
+{
+    int rv = -1;
+    remote_domain_migrate_prepare3_args args;
+    remote_domain_migrate_prepare3_ret ret;
+    struct private_data *priv = dconn->privateData;
+
+    remoteDriverLock(priv);
+
+    memset(&args, 0, sizeof(args));
+    memset(&ret, 0, sizeof(ret));
+
+    args.cookie_in.cookie_in_val = (char *)cookiein;
+    args.cookie_in.cookie_in_len = cookieinlen;
+    args.uri_in = uri_in == NULL ? NULL : (char **) &uri_in;
+    args.flags = flags;
+    args.dname = dname == NULL ? NULL : (char **) &dname;
+    args.resource = resource;
+    args.dom_xml = (char *) dom_xml;
+
+    memset (&ret, 0, sizeof ret);
+    if (call (dconn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3,
+              (xdrproc_t) xdr_remote_domain_migrate_prepare3_args, (char *) &args,
+              (xdrproc_t) xdr_remote_domain_migrate_prepare3_ret, (char *) &ret) == -1)
+        goto done;
+
+    if (ret.cookie_out.cookie_out_len > 0) {
+        if (!cookieout || !cookieoutlen) {
+            remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
+                        _("caller ignores cookieout or cookieoutlen"));
+            goto error;
+        }
+        *cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
+        *cookieoutlen = ret.cookie_out.cookie_out_len;
+    }
+    if (ret.uri_out) {
+        if (!uri_out) {
+            remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
+                        _("caller ignores uri_out"));
+            goto error;
+        }
+        *uri_out = *ret.uri_out; /* Caller frees. */
+    }
+
+    rv = 0;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+error:
+    VIR_FREE(ret.cookie_out.cookie_out_val);
+    if (ret.uri_out)
+        VIR_FREE(*ret.uri_out);
+    goto done;
+}
+
+
+static int
+remoteDomainMigratePrepareTunnel3(virConnectPtr dconn,
+                                  virStreamPtr st,
+                                  const char *cookiein,
+                                  int cookieinlen,
+                                  char **cookieout,
+                                  int *cookieoutlen,
+                                  unsigned long flags,
+                                  const char *dname,
+                                  unsigned long resource,
+                                  const char *dom_xml)
+{
+    struct private_data *priv = dconn->privateData;
+    struct private_stream_data *privst = NULL;
+    int rv = -1;
+    remote_domain_migrate_prepare_tunnel3_args args;
+    remote_domain_migrate_prepare_tunnel3_ret ret;
+
+    remoteDriverLock(priv);
+
+    memset(&args, 0, sizeof(args));
+    memset(&ret, 0, sizeof(ret));
+
+    if (!(privst = remoteStreamOpen(st, 1,
+                                    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3,
+                                    priv->counter)))
+        goto done;
+
+    st->driver = &remoteStreamDrv;
+    st->privateData = privst;
+
+    args.cookie_in.cookie_in_val = (char *)cookiein;
+    args.cookie_in.cookie_in_len = cookieinlen;
+    args.flags = flags;
+    args.dname = dname == NULL ? NULL : (char **) &dname;
+    args.resource = resource;
+    args.dom_xml = (char *) dom_xml;
+
+    if (call(dconn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3,
+             (xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_args, (char *) &args,
+             (xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_ret, (char *) &ret) == -1) {
+        remoteStreamRelease(st);
+        goto done;
+    }
+
+    if (ret.cookie_out.cookie_out_len > 0) {
+        if (!cookieout || !cookieoutlen) {
+            remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
+                        _("caller ignores cookieout or cookieoutlen"));
+            goto error;
+        }
+        *cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
+        *cookieoutlen = ret.cookie_out.cookie_out_len;
+    }
+
+    rv = 0;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+
+error:
+    VIR_FREE(ret.cookie_out.cookie_out_val);
+    goto done;
+}
+
+
+static int
+remoteDomainMigratePerform3(virDomainPtr dom,
+                            const char *cookiein,
+                            int cookieinlen,
+                            char **cookieout,
+                            int *cookieoutlen,
+                            const char *uri,
+                            unsigned long flags,
+                            const char *dname,
+                            unsigned long resource)
+{
+    int rv = -1;
+    remote_domain_migrate_perform3_args args;
+    remote_domain_migrate_perform3_ret ret;
+    struct private_data *priv = dom->conn->privateData;
+
+    remoteDriverLock(priv);
+
+    memset(&args, 0, sizeof(args));
+    memset(&ret, 0, sizeof(ret));
+
+    make_nonnull_domain(&args.dom, dom);
+
+    args.cookie_in.cookie_in_val = (char *)cookiein;
+    args.cookie_in.cookie_in_len = cookieinlen;
+    args.uri = (char *) uri;
+    args.flags = flags;
+    args.dname = dname == NULL ? NULL : (char **) &dname;
+    args.resource = resource;
+
+    if (call (dom->conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3,
+              (xdrproc_t) xdr_remote_domain_migrate_perform3_args, (char *) &args,
+              (xdrproc_t) xdr_remote_domain_migrate_perform3_ret, (char *) &ret) == -1)
+        goto done;
+
+    if (ret.cookie_out.cookie_out_len > 0) {
+        if (!cookieout || !cookieoutlen) {
+            remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
+                        _("caller ignores cookieout or cookieoutlen"));
+            goto error;
+        }
+        *cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
+        *cookieoutlen = ret.cookie_out.cookie_out_len;
+    }
+
+    rv = 0;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+
+error:
+    VIR_FREE(ret.cookie_out.cookie_out_val);
+    goto done;
+}
+
+
+static int
+remoteDomainMigrateFinish3(virConnectPtr dconn,
+                           const char *dname,
+                           const char *cookiein,
+                           int cookieinlen,
+                           char **cookieout,
+                           int *cookieoutlen,
+                           const char *uri,
+                           unsigned long flags,
+                           int cancelled,
+                           virDomainPtr *ddom)
+{
+    remote_domain_migrate_finish3_args args;
+    remote_domain_migrate_finish3_ret ret;
+    struct private_data *priv = dconn->privateData;
+    int rv = -1;
+
+    remoteDriverLock(priv);
+
+    *ddom = NULL;
+    memset(&args, 0, sizeof(args));
+    memset(&ret, 0, sizeof(ret));
+
+    args.cookie_in.cookie_in_val = (char *)cookiein;
+    args.cookie_in.cookie_in_len = cookieinlen;
+    args.dname = (char *) dname;
+    args.uri = (char *) uri;
+    args.flags = flags;
+    args.cancelled = cancelled;
+
+    if (call (dconn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_FINISH3,
+              (xdrproc_t) xdr_remote_domain_migrate_finish3_args, (char *) &args,
+              (xdrproc_t) xdr_remote_domain_migrate_finish3_ret, (char *) &ret) == -1)
+        goto done;
+
+    *ddom = get_domain(dconn, ret.ddom);
+
+    if (ret.cookie_out.cookie_out_len > 0) {
+        if (!cookieout || !cookieoutlen) {
+            remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
+                        _("caller ignores cookieout or cookieoutlen"));
+            goto error;
+        }
+        *cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
+        *cookieoutlen = ret.cookie_out.cookie_out_len;
+        ret.cookie_out.cookie_out_val = NULL;
+        ret.cookie_out.cookie_out_len = 0;
+    }
+
+    xdr_free ((xdrproc_t) &xdr_remote_domain_migrate_finish2_ret, (char *) &ret);
+
+    rv = 0;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+
+error:
+    VIR_FREE(ret.cookie_out.cookie_out_val);
+    goto done;
+}
+
+
+static int
+remoteDomainMigrateConfirm3(virDomainPtr domain,
+                            const char *cookiein,
+                            int cookieinlen,
+                            unsigned long flags,
+                            int cancelled)
+{
+    int rv = -1;
+    remote_domain_migrate_confirm3_args args;
+    struct private_data *priv = domain->conn->privateData;
+
+    remoteDriverLock(priv);
+
+    memset(&args, 0, sizeof(args));
+
+    make_nonnull_domain (&args.dom, domain);
+    args.cookie_in.cookie_in_len = cookieinlen;
+    args.cookie_in.cookie_in_val = (char *) cookiein;
+    args.flags = flags;
+    args.cancelled = cancelled;
+
+    if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3,
+              (xdrproc_t) xdr_remote_domain_migrate_confirm3_args, (char *) &args,
+              (xdrproc_t) xdr_void, (char *) NULL) == -1)
+        goto done;
+
+    rv = 0;
+
+done:
+    remoteDriverUnlock(priv);
+    return rv;
+}
+
+
 /*----------------------------------------------------------------------*/
 
 static struct remote_thread_call *
@@ -10714,6 +11057,22 @@ remoteDomainEventQueueFlush(int timer ATTRIBUTE_UNUSED, void *opaque)
  * but if they do then virterror_internal.has been set.
  */
 static virDomainPtr
+get_domain (virConnectPtr conn, remote_domain domain)
+{
+    virDomainPtr dom = NULL;
+    if (domain) {
+        dom = virGetDomain (conn, domain->name, BAD_CAST domain->uuid);
+        if (dom) dom->id = domain->id;
+    }
+    return dom;
+}
+
+/* get_nonnull_domain and get_nonnull_network turn an on-wire
+ * (name, uuid) pair into virDomainPtr or virNetworkPtr object.
+ * These can return NULL if underlying memory allocations fail,
+ * but if they do then virterror_internal.has been set.
+ */
+static virDomainPtr
 get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain)
 {
     virDomainPtr dom;
@@ -10946,12 +11305,12 @@ static virDriver remote_driver = {
     remoteDomainSetMemoryParameters, /* domainSetMemoryParameters */
     remoteDomainGetMemoryParameters, /* domainGetMemoryParameters */
     remoteDomainOpenConsole, /* domainOpenConsole */
-    NULL, /* domainMigrateBegin3 */
-    NULL, /* domainMigratePrepare3 */
-    NULL, /* domainMigratePrepareTunnel3 */
-    NULL, /* domainMigratePerform3 */
-    NULL, /* domainMigrateFinish3 */
-    NULL, /* domainMigrateConfirm3 */
+    remoteDomainMigrateBegin3, /* domainMigrateBegin3 */
+    remoteDomainMigratePrepare3, /* domainMigratePrepare3 */
+    remoteDomainMigratePrepareTunnel3, /* domainMigratePrepareTunnel3 */
+    remoteDomainMigratePerform3, /* domainMigratePerform3 */
+    remoteDomainMigrateFinish3, /* domainMigrateFinish3 */
+    remoteDomainMigrateConfirm3, /* domainMigrateConfirm3 */
 };
 
 static virNetworkDriver network_driver = {
diff --git a/src/remote/remote_protocol.c b/src/remote/remote_protocol.c
index bae92ca..e1df37a 100644
--- a/src/remote/remote_protocol.c
+++ b/src/remote/remote_protocol.c
@@ -3758,6 +3758,169 @@ xdr_remote_domain_open_console_args (XDR *xdrs, remote_domain_open_console_args
 }
 
 bool_t
+xdr_remote_domain_migrate_begin3_args (XDR *xdrs, remote_domain_migrate_begin3_args *objp)
+{
+
+         if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->flags))
+                 return FALSE;
+         if (!xdr_remote_string (xdrs, &objp->dname))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->resource))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_begin3_ret (XDR *xdrs, remote_domain_migrate_begin3_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_out.cookie_out_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_out.cookie_out_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_prepare3_args (XDR *xdrs, remote_domain_migrate_prepare3_args *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_in.cookie_in_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_in.cookie_in_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_remote_string (xdrs, &objp->uri_in))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->flags))
+                 return FALSE;
+         if (!xdr_remote_string (xdrs, &objp->dname))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->resource))
+                 return FALSE;
+         if (!xdr_remote_nonnull_string (xdrs, &objp->dom_xml))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_prepare3_ret (XDR *xdrs, remote_domain_migrate_prepare3_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_out.cookie_out_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_out.cookie_out_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_remote_string (xdrs, &objp->uri_out))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_prepare_tunnel3_args (XDR *xdrs, remote_domain_migrate_prepare_tunnel3_args *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_in.cookie_in_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_in.cookie_in_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->flags))
+                 return FALSE;
+         if (!xdr_remote_string (xdrs, &objp->dname))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->resource))
+                 return FALSE;
+         if (!xdr_remote_nonnull_string (xdrs, &objp->dom_xml))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_prepare_tunnel3_ret (XDR *xdrs, remote_domain_migrate_prepare_tunnel3_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_out.cookie_out_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_out.cookie_out_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_perform3_args (XDR *xdrs, remote_domain_migrate_perform3_args *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_in.cookie_in_val;
+
+         if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
+                 return FALSE;
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_in.cookie_in_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->flags))
+                 return FALSE;
+         if (!xdr_remote_string (xdrs, &objp->dname))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->resource))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_perform3_ret (XDR *xdrs, remote_domain_migrate_perform3_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_out.cookie_out_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_out.cookie_out_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_finish3_args (XDR *xdrs, remote_domain_migrate_finish3_args *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_in.cookie_in_val;
+
+         if (!xdr_remote_nonnull_string (xdrs, &objp->dname))
+                 return FALSE;
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_in.cookie_in_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->flags))
+                 return FALSE;
+         if (!xdr_int (xdrs, &objp->cancelled))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_finish3_ret (XDR *xdrs, remote_domain_migrate_finish3_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_out.cookie_out_val;
+
+         if (!xdr_remote_domain (xdrs, &objp->ddom))
+                 return FALSE;
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_out.cookie_out_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_domain_migrate_confirm3_args (XDR *xdrs, remote_domain_migrate_confirm3_args *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->cookie_in.cookie_in_val;
+
+         if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
+                 return FALSE;
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->cookie_in.cookie_in_len, REMOTE_MIGRATE_COOKIE_MAX))
+                 return FALSE;
+         if (!xdr_uint64_t (xdrs, &objp->flags))
+                 return FALSE;
+         if (!xdr_int (xdrs, &objp->cancelled))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
 xdr_remote_procedure (XDR *xdrs, remote_procedure *objp)
 {
 
diff --git a/src/remote/remote_protocol.h b/src/remote/remote_protocol.h
index 46d526a..016a2bb 100644
--- a/src/remote/remote_protocol.h
+++ b/src/remote/remote_protocol.h
@@ -2124,6 +2124,118 @@ struct remote_domain_open_console_args {
         u_int flags;
 };
 typedef struct remote_domain_open_console_args remote_domain_open_console_args;
+
+struct remote_domain_migrate_begin3_args {
+        remote_nonnull_domain dom;
+        uint64_t flags;
+        remote_string dname;
+        uint64_t resource;
+};
+typedef struct remote_domain_migrate_begin3_args remote_domain_migrate_begin3_args;
+
+struct remote_domain_migrate_begin3_ret {
+        struct {
+                u_int cookie_out_len;
+                char *cookie_out_val;
+        } cookie_out;
+        remote_nonnull_string xml;
+};
+typedef struct remote_domain_migrate_begin3_ret remote_domain_migrate_begin3_ret;
+
+struct remote_domain_migrate_prepare3_args {
+        struct {
+                u_int cookie_in_len;
+                char *cookie_in_val;
+        } cookie_in;
+        remote_string uri_in;
+        uint64_t flags;
+        remote_string dname;
+        uint64_t resource;
+        remote_nonnull_string dom_xml;
+};
+typedef struct remote_domain_migrate_prepare3_args remote_domain_migrate_prepare3_args;
+
+struct remote_domain_migrate_prepare3_ret {
+        struct {
+                u_int cookie_out_len;
+                char *cookie_out_val;
+        } cookie_out;
+        remote_string uri_out;
+};
+typedef struct remote_domain_migrate_prepare3_ret remote_domain_migrate_prepare3_ret;
+
+struct remote_domain_migrate_prepare_tunnel3_args {
+        struct {
+                u_int cookie_in_len;
+                char *cookie_in_val;
+        } cookie_in;
+        uint64_t flags;
+        remote_string dname;
+        uint64_t resource;
+        remote_nonnull_string dom_xml;
+};
+typedef struct remote_domain_migrate_prepare_tunnel3_args remote_domain_migrate_prepare_tunnel3_args;
+
+struct remote_domain_migrate_prepare_tunnel3_ret {
+        struct {
+                u_int cookie_out_len;
+                char *cookie_out_val;
+        } cookie_out;
+};
+typedef struct remote_domain_migrate_prepare_tunnel3_ret remote_domain_migrate_prepare_tunnel3_ret;
+
+struct remote_domain_migrate_perform3_args {
+        remote_nonnull_domain dom;
+        struct {
+                u_int cookie_in_len;
+                char *cookie_in_val;
+        } cookie_in;
+        remote_nonnull_string uri;
+        uint64_t flags;
+        remote_string dname;
+        uint64_t resource;
+};
+typedef struct remote_domain_migrate_perform3_args remote_domain_migrate_perform3_args;
+
+struct remote_domain_migrate_perform3_ret {
+        struct {
+                u_int cookie_out_len;
+                char *cookie_out_val;
+        } cookie_out;
+};
+typedef struct remote_domain_migrate_perform3_ret remote_domain_migrate_perform3_ret;
+
+struct remote_domain_migrate_finish3_args {
+        remote_nonnull_string dname;
+        struct {
+                u_int cookie_in_len;
+                char *cookie_in_val;
+        } cookie_in;
+        remote_nonnull_string uri;
+        uint64_t flags;
+        int cancelled;
+};
+typedef struct remote_domain_migrate_finish3_args remote_domain_migrate_finish3_args;
+
+struct remote_domain_migrate_finish3_ret {
+        remote_domain ddom;
+        struct {
+                u_int cookie_out_len;
+                char *cookie_out_val;
+        } cookie_out;
+};
+typedef struct remote_domain_migrate_finish3_ret remote_domain_migrate_finish3_ret;
+
+struct remote_domain_migrate_confirm3_args {
+        remote_nonnull_domain dom;
+        struct {
+                u_int cookie_in_len;
+                char *cookie_in_val;
+        } cookie_in;
+        uint64_t flags;
+        int cancelled;
+};
+typedef struct remote_domain_migrate_confirm3_args remote_domain_migrate_confirm3_args;
 #define REMOTE_PROGRAM 0x20008086
 #define REMOTE_PROTOCOL_VERSION 1
 
@@ -2331,6 +2443,12 @@ enum remote_procedure {
         REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201,
         REMOTE_PROC_DOMAIN_IS_UPDATED = 202,
         REMOTE_PROC_GET_SYSINFO = 203,
+        REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 204,
+        REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 205,
+        REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 206,
+        REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 207,
+        REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 208,
+        REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 209,
 };
 typedef enum remote_procedure remote_procedure;
 
@@ -2705,6 +2823,17 @@ extern  bool_t xdr_remote_domain_snapshot_current_ret (XDR *, remote_domain_snap
 extern  bool_t xdr_remote_domain_revert_to_snapshot_args (XDR *, remote_domain_revert_to_snapshot_args*);
 extern  bool_t xdr_remote_domain_snapshot_delete_args (XDR *, remote_domain_snapshot_delete_args*);
 extern  bool_t xdr_remote_domain_open_console_args (XDR *, remote_domain_open_console_args*);
+extern  bool_t xdr_remote_domain_migrate_begin3_args (XDR *, remote_domain_migrate_begin3_args*);
+extern  bool_t xdr_remote_domain_migrate_begin3_ret (XDR *, remote_domain_migrate_begin3_ret*);
+extern  bool_t xdr_remote_domain_migrate_prepare3_args (XDR *, remote_domain_migrate_prepare3_args*);
+extern  bool_t xdr_remote_domain_migrate_prepare3_ret (XDR *, remote_domain_migrate_prepare3_ret*);
+extern  bool_t xdr_remote_domain_migrate_prepare_tunnel3_args (XDR *, remote_domain_migrate_prepare_tunnel3_args*);
+extern  bool_t xdr_remote_domain_migrate_prepare_tunnel3_ret (XDR *, remote_domain_migrate_prepare_tunnel3_ret*);
+extern  bool_t xdr_remote_domain_migrate_perform3_args (XDR *, remote_domain_migrate_perform3_args*);
+extern  bool_t xdr_remote_domain_migrate_perform3_ret (XDR *, remote_domain_migrate_perform3_ret*);
+extern  bool_t xdr_remote_domain_migrate_finish3_args (XDR *, remote_domain_migrate_finish3_args*);
+extern  bool_t xdr_remote_domain_migrate_finish3_ret (XDR *, remote_domain_migrate_finish3_ret*);
+extern  bool_t xdr_remote_domain_migrate_confirm3_args (XDR *, remote_domain_migrate_confirm3_args*);
 extern  bool_t xdr_remote_procedure (XDR *, remote_procedure*);
 extern  bool_t xdr_remote_message_type (XDR *, remote_message_type*);
 extern  bool_t xdr_remote_message_status (XDR *, remote_message_status*);
@@ -3053,6 +3182,17 @@ extern bool_t xdr_remote_domain_snapshot_current_ret ();
 extern bool_t xdr_remote_domain_revert_to_snapshot_args ();
 extern bool_t xdr_remote_domain_snapshot_delete_args ();
 extern bool_t xdr_remote_domain_open_console_args ();
+extern bool_t xdr_remote_domain_migrate_begin3_args ();
+extern bool_t xdr_remote_domain_migrate_begin3_ret ();
+extern bool_t xdr_remote_domain_migrate_prepare3_args ();
+extern bool_t xdr_remote_domain_migrate_prepare3_ret ();
+extern bool_t xdr_remote_domain_migrate_prepare_tunnel3_args ();
+extern bool_t xdr_remote_domain_migrate_prepare_tunnel3_ret ();
+extern bool_t xdr_remote_domain_migrate_perform3_args ();
+extern bool_t xdr_remote_domain_migrate_perform3_ret ();
+extern bool_t xdr_remote_domain_migrate_finish3_args ();
+extern bool_t xdr_remote_domain_migrate_finish3_ret ();
+extern bool_t xdr_remote_domain_migrate_confirm3_args ();
 extern bool_t xdr_remote_procedure ();
 extern bool_t xdr_remote_message_type ();
 extern bool_t xdr_remote_message_status ();
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index e77aca1..7eb27bd 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1874,6 +1874,77 @@ struct remote_domain_open_console_args {
     unsigned int flags;
 };
 
+struct remote_domain_migrate_begin3_args {
+    remote_nonnull_domain dom;
+    unsigned hyper flags;
+    remote_string dname;
+    unsigned hyper resource;
+};
+
+struct remote_domain_migrate_begin3_ret {
+    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
+    remote_nonnull_string xml;
+};
+
+struct remote_domain_migrate_prepare3_args {
+    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
+    remote_string uri_in;
+    unsigned hyper flags;
+    remote_string dname;
+    unsigned hyper resource;
+    remote_nonnull_string dom_xml;
+};
+
+struct remote_domain_migrate_prepare3_ret {
+    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
+    remote_string uri_out;
+};
+
+struct remote_domain_migrate_prepare_tunnel3_args {
+    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
+    unsigned hyper flags;
+    remote_string dname;
+    unsigned hyper resource;
+    remote_nonnull_string dom_xml;
+};
+
+struct remote_domain_migrate_prepare_tunnel3_ret {
+    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
+};
+
+struct remote_domain_migrate_perform3_args {
+    remote_nonnull_domain dom;
+    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
+    remote_nonnull_string uri;
+    unsigned hyper flags;
+    remote_string dname;
+    unsigned hyper resource;
+};
+
+struct remote_domain_migrate_perform3_ret {
+    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
+};
+
+struct remote_domain_migrate_finish3_args {
+    remote_nonnull_string dname;
+    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
+    remote_nonnull_string uri;
+    unsigned hyper flags;
+    int cancelled;
+};
+
+struct remote_domain_migrate_finish3_ret {
+    remote_domain ddom;
+    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
+};
+
+struct remote_domain_migrate_confirm3_args {
+    remote_nonnull_domain dom;
+    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
+    unsigned hyper flags;
+    int cancelled;
+};
+
 /*----- Protocol. -----*/
 
 /* Define the program number, protocol version and procedure numbers here. */
@@ -2103,7 +2174,13 @@ enum remote_procedure {
 
     REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201,
     REMOTE_PROC_DOMAIN_IS_UPDATED = 202,
-    REMOTE_PROC_GET_SYSINFO = 203
+    REMOTE_PROC_GET_SYSINFO = 203,
+    REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 204,
+    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 205,
+    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 206,
+    REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 207,
+    REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 208,
+    REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 209
 
     /*
      * Notice how the entries are grouped in sets of 10 ?
-- 
1.7.4


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