43fe83
From ecbf7a620fb79456724d37e86069e5a006e45270 Mon Sep 17 00:00:00 2001
43fe83
Message-Id: <ecbf7a620fb79456724d37e86069e5a006e45270.1382534061.git.jdenemar@redhat.com>
43fe83
From: Michal Privoznik <mprivozn@redhat.com>
43fe83
Date: Fri, 11 Oct 2013 11:24:35 +0200
43fe83
Subject: [PATCH] qemu: Implement support for VIR_MIGRATE_PARAM_LISTEN_ADDRESS
43fe83
43fe83
https://bugzilla.redhat.com/show_bug.cgi?id=1015215
43fe83
43fe83
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
43fe83
(cherry picked from commit c4ac7ef6638081c79ee7e9209bc49a81560a9f25)
43fe83
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
43fe83
---
43fe83
 src/qemu/qemu_driver.c    |  26 +++++++----
43fe83
 src/qemu/qemu_migration.c | 112 +++++++++++++++++++++++++++++++---------------
43fe83
 src/qemu/qemu_migration.h |  13 +++---
43fe83
 3 files changed, 102 insertions(+), 49 deletions(-)
43fe83
43fe83
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
43fe83
index 3d0b56e..91549fb 100644
43fe83
--- a/src/qemu/qemu_driver.c
43fe83
+++ b/src/qemu/qemu_driver.c
43fe83
@@ -10330,7 +10330,7 @@ qemuDomainMigratePrepare2(virConnectPtr dconn,
43fe83
     ret = qemuMigrationPrepareDirect(driver, dconn,
43fe83
                                      NULL, 0, NULL, NULL, /* No cookies */
43fe83
                                      uri_in, uri_out,
43fe83
-                                     &def, origname, flags);
43fe83
+                                     &def, origname, NULL, flags);
43fe83
 
43fe83
 cleanup:
43fe83
     VIR_FREE(origname);
43fe83
@@ -10381,7 +10381,8 @@ qemuDomainMigratePerform(virDomainPtr dom,
43fe83
      * Consume any cookie we were able to decode though
43fe83
      */
43fe83
     ret = qemuMigrationPerform(driver, dom->conn, vm,
43fe83
-                               NULL, dconnuri, uri, NULL, cookie, cookielen,
43fe83
+                               NULL, dconnuri, uri, NULL, NULL,
43fe83
+                               cookie, cookielen,
43fe83
                                NULL, NULL, /* No output cookies in v2 */
43fe83
                                flags, dname, resource, false);
43fe83
 
43fe83
@@ -10535,7 +10536,7 @@ qemuDomainMigratePrepare3(virConnectPtr dconn,
43fe83
                                      cookiein, cookieinlen,
43fe83
                                      cookieout, cookieoutlen,
43fe83
                                      uri_in, uri_out,
43fe83
-                                     &def, origname, flags);
43fe83
+                                     &def, origname, NULL, flags);
43fe83
 
43fe83
 cleanup:
43fe83
     VIR_FREE(origname);
43fe83
@@ -10559,6 +10560,7 @@ qemuDomainMigratePrepare3Params(virConnectPtr dconn,
43fe83
     const char *dom_xml = NULL;
43fe83
     const char *dname = NULL;
43fe83
     const char *uri_in = NULL;
43fe83
+    const char *listenAddress = NULL;
43fe83
     char *origname = NULL;
43fe83
     int ret = -1;
43fe83
 
43fe83
@@ -10574,7 +10576,10 @@ qemuDomainMigratePrepare3Params(virConnectPtr dconn,
43fe83
                                 &dname) < 0 ||
43fe83
         virTypedParamsGetString(params, nparams,
43fe83
                                 VIR_MIGRATE_PARAM_URI,
43fe83
-                                &uri_in) < 0)
43fe83
+                                &uri_in) < 0 ||
43fe83
+        virTypedParamsGetString(params, nparams,
43fe83
+                                VIR_MIGRATE_PARAM_LISTEN_ADDRESS,
43fe83
+                                &listenAddress) < 0)
43fe83
         return -1;
43fe83
 
43fe83
     if (flags & VIR_MIGRATE_TUNNELLED) {
43fe83
@@ -10597,7 +10602,7 @@ qemuDomainMigratePrepare3Params(virConnectPtr dconn,
43fe83
                                      cookiein, cookieinlen,
43fe83
                                      cookieout, cookieoutlen,
43fe83
                                      uri_in, uri_out,
43fe83
-                                     &def, origname, flags);
43fe83
+                                     &def, origname, listenAddress, flags);
43fe83
 
43fe83
 cleanup:
43fe83
     VIR_FREE(origname);
43fe83
@@ -10729,7 +10734,8 @@ qemuDomainMigratePerform3(virDomainPtr dom,
43fe83
     }
43fe83
 
43fe83
     return qemuMigrationPerform(driver, dom->conn, vm, xmlin,
43fe83
-                                dconnuri, uri, NULL, cookiein, cookieinlen,
43fe83
+                                dconnuri, uri, NULL, NULL,
43fe83
+                                cookiein, cookieinlen,
43fe83
                                 cookieout, cookieoutlen,
43fe83
                                 flags, dname, resource, true);
43fe83
 }
43fe83
@@ -10751,6 +10757,7 @@ qemuDomainMigratePerform3Params(virDomainPtr dom,
43fe83
     const char *dname = NULL;
43fe83
     const char *uri = NULL;
43fe83
     const char *graphicsuri = NULL;
43fe83
+    const char *listenAddress = NULL;
43fe83
     unsigned long long bandwidth = 0;
43fe83
 
43fe83
     virCheckFlags(QEMU_MIGRATION_FLAGS, -1);
43fe83
@@ -10771,7 +10778,10 @@ qemuDomainMigratePerform3Params(virDomainPtr dom,
43fe83
                                 &bandwidth) < 0 ||
43fe83
         virTypedParamsGetString(params, nparams,
43fe83
                                 VIR_MIGRATE_PARAM_GRAPHICS_URI,
43fe83
-                                &graphicsuri) < 0)
43fe83
+                                &graphicsuri) < 0 ||
43fe83
+        virTypedParamsGetString(params, nparams,
43fe83
+                                VIR_MIGRATE_PARAM_LISTEN_ADDRESS,
43fe83
+                                &listenAddress) < 0)
43fe83
         return -1;
43fe83
 
43fe83
     if (!(vm = qemuDomObjFromDomain(dom)))
43fe83
@@ -10783,7 +10793,7 @@ qemuDomainMigratePerform3Params(virDomainPtr dom,
43fe83
     }
43fe83
 
43fe83
     return qemuMigrationPerform(driver, dom->conn, vm, dom_xml,
43fe83
-                                dconnuri, uri, graphicsuri,
43fe83
+                                dconnuri, uri, graphicsuri, listenAddress,
43fe83
                                 cookiein, cookieinlen, cookieout, cookieoutlen,
43fe83
                                 flags, dname, bandwidth, true);
43fe83
 }
43fe83
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
43fe83
index 4f53576..3f07b86 100644
43fe83
--- a/src/qemu/qemu_migration.c
43fe83
+++ b/src/qemu/qemu_migration.c
43fe83
@@ -1100,12 +1100,6 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
43fe83
     unsigned short port = 0;
43fe83
     char *diskAlias = NULL;
43fe83
     size_t i;
43fe83
-    const char *host;
43fe83
-
43fe83
-    if (STREQ(listenAddr, "[::]"))
43fe83
-        host = "::";
43fe83
-    else
43fe83
-        host = listenAddr;
43fe83
 
43fe83
     for (i = 0; i < vm->def->ndisks; i++) {
43fe83
         virDomainDiskDefPtr disk = vm->def->disks[i];
43fe83
@@ -1125,7 +1119,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
43fe83
 
43fe83
         if (!port &&
43fe83
             ((virPortAllocatorAcquire(driver->remotePorts, &port) < 0) ||
43fe83
-             (qemuMonitorNBDServerStart(priv->mon, host, port) < 0))) {
43fe83
+             (qemuMonitorNBDServerStart(priv->mon, listenAddr, port) < 0))) {
43fe83
             qemuDomainObjExitMonitor(driver, vm);
43fe83
             goto cleanup;
43fe83
         }
43fe83
@@ -2167,6 +2161,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
43fe83
                         const char *origname,
43fe83
                         virStreamPtr st,
43fe83
                         unsigned int port,
43fe83
+                        const char *listenAddress,
43fe83
                         unsigned long flags)
43fe83
 {
43fe83
     virDomainObjPtr vm = NULL;
43fe83
@@ -2180,7 +2175,6 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
43fe83
     char *xmlout = NULL;
43fe83
     unsigned int cookieFlags;
43fe83
     virCapsPtr caps = NULL;
43fe83
-    const char *listenAddr = NULL;
43fe83
     char *migrateFrom = NULL;
43fe83
     bool abort_on_error = !!(flags & VIR_MIGRATE_ABORT_ON_ERROR);
43fe83
 
43fe83
@@ -2264,31 +2258,65 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
43fe83
         if (VIR_STRDUP(migrateFrom, "stdio") < 0)
43fe83
             goto cleanup;
43fe83
     } else {
43fe83
+        virSocketAddr listenAddressSocket;
43fe83
+        bool encloseAddress = false;
43fe83
+        bool hostIPv6Capable = false;
43fe83
+        bool qemuIPv6Capable = false;
43fe83
         virQEMUCapsPtr qemuCaps = NULL;
43fe83
         struct addrinfo *info = NULL;
43fe83
         struct addrinfo hints = { .ai_flags = AI_ADDRCONFIG,
43fe83
                                   .ai_socktype = SOCK_STREAM };
43fe83
 
43fe83
+        if (getaddrinfo("::", NULL, &hints, &info) == 0) {
43fe83
+            freeaddrinfo(info);
43fe83
+            hostIPv6Capable = true;
43fe83
+        }
43fe83
         if (!(qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
43fe83
                                                     (*def)->emulator)))
43fe83
             goto cleanup;
43fe83
 
43fe83
-        /* Listen on :: instead of 0.0.0.0 if QEMU understands it
43fe83
-         * and there is at least one IPv6 address configured
43fe83
-         */
43fe83
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION) &&
43fe83
-            getaddrinfo("::", NULL, &hints, &info) == 0) {
43fe83
-            freeaddrinfo(info);
43fe83
-            listenAddr = "[::]";
43fe83
+        qemuIPv6Capable = virQEMUCapsGet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
43fe83
+        virObjectUnref(qemuCaps);
43fe83
+
43fe83
+        if (listenAddress) {
43fe83
+            if (virSocketAddrIsNumeric(listenAddress)) {
43fe83
+                /* listenAddress is numeric IPv4 or IPv6 */
43fe83
+                if (virSocketAddrParse(&listenAddressSocket, listenAddress, AF_UNSPEC) < 0)
43fe83
+                    goto cleanup;
43fe83
+
43fe83
+                /* address parsed successfully */
43fe83
+                if (VIR_SOCKET_ADDR_IS_FAMILY(&listenAddressSocket, AF_INET6)) {
43fe83
+                    if (!qemuIPv6Capable) {
43fe83
+                        virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
43fe83
+                                       _("qemu isn't capable of IPv6"));
43fe83
+                        goto cleanup;
43fe83
+                    }
43fe83
+                    if (!hostIPv6Capable) {
43fe83
+                        virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
43fe83
+                                       _("host isn't capable of IPv6"));
43fe83
+                        goto cleanup;
43fe83
+                    }
43fe83
+                    /* IPv6 address must be escaped in brackets on the cmd line */
43fe83
+                    encloseAddress = true;
43fe83
+                }
43fe83
+            } else {
43fe83
+                /* listenAddress is a hostname */
43fe83
+            }
43fe83
         } else {
43fe83
-            listenAddr = "0.0.0.0";
43fe83
+            /* Listen on :: instead of 0.0.0.0 if QEMU understands it
43fe83
+             * and there is at least one IPv6 address configured
43fe83
+             */
43fe83
+            listenAddress = qemuIPv6Capable && hostIPv6Capable ?
43fe83
+                encloseAddress = true, "::" : "0.0.0.0";
43fe83
         }
43fe83
-        virObjectUnref(qemuCaps);
43fe83
 
43fe83
-        /* QEMU will be started with -incoming [::]:port
43fe83
-         * or -incoming 0.0.0.0:port
43fe83
+        /* QEMU will be started with -incoming [<IPv6 addr>]:port,
43fe83
+         * -incoming <IPv4 addr>:port or -incoming <hostname>:port
43fe83
          */
43fe83
-        if (virAsprintf(&migrateFrom, "tcp:%s:%d", listenAddr, port) < 0)
43fe83
+        if ((encloseAddress &&
43fe83
+             virAsprintf(&migrateFrom, "tcp:[%s]:%d", listenAddress, port) < 0) ||
43fe83
+            (!encloseAddress &&
43fe83
+             virAsprintf(&migrateFrom, "tcp:%s:%d", listenAddress, port) < 0))
43fe83
             goto cleanup;
43fe83
     }
43fe83
 
43fe83
@@ -2375,7 +2403,7 @@ done:
43fe83
     if (mig->nbd &&
43fe83
         flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC) &&
43fe83
         virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) {
43fe83
-        if (qemuMigrationStartNBDServer(driver, vm, listenAddr) < 0) {
43fe83
+        if (qemuMigrationStartNBDServer(driver, vm, listenAddress) < 0) {
43fe83
             /* error already reported */
43fe83
             goto endjob;
43fe83
         }
43fe83
@@ -2479,7 +2507,7 @@ qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
43fe83
 
43fe83
     ret = qemuMigrationPrepareAny(driver, dconn, cookiein, cookieinlen,
43fe83
                                   cookieout, cookieoutlen, def, origname,
43fe83
-                                  st, 0, flags);
43fe83
+                                  st, 0, NULL, flags);
43fe83
     return ret;
43fe83
 }
43fe83
 
43fe83
@@ -2495,6 +2523,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
43fe83
                            char **uri_out,
43fe83
                            virDomainDefPtr *def,
43fe83
                            const char *origname,
43fe83
+                           const char *listenAddress,
43fe83
                            unsigned long flags)
43fe83
 {
43fe83
     static int port = 0;
43fe83
@@ -2600,7 +2629,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
43fe83
 
43fe83
     ret = qemuMigrationPrepareAny(driver, dconn, cookiein, cookieinlen,
43fe83
                                   cookieout, cookieoutlen, def, origname,
43fe83
-                                  NULL, this_port, flags);
43fe83
+                                  NULL, this_port, listenAddress, flags);
43fe83
 cleanup:
43fe83
     virURIFree(uri);
43fe83
     VIR_FREE(hostname);
43fe83
@@ -3604,6 +3633,7 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
43fe83
                     const char *dname,
43fe83
                     const char *uri,
43fe83
                     const char *graphicsuri,
43fe83
+                    const char *listenAddress,
43fe83
                     unsigned long long bandwidth,
43fe83
                     bool useParams,
43fe83
                     unsigned long flags)
43fe83
@@ -3625,11 +3655,11 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
43fe83
     int maxparams = 0;
43fe83
 
43fe83
     VIR_DEBUG("driver=%p, sconn=%p, dconn=%p, dconnuri=%s, vm=%p, xmlin=%s, "
43fe83
-              "dname=%s, uri=%s, graphicsuri=%s, bandwidth=%llu, "
43fe83
-              "useParams=%d, flags=%lx",
43fe83
+              "dname=%s, uri=%s, graphicsuri=%s, listenAddress=%s, "
43fe83
+              "bandwidth=%llu, useParams=%d, flags=%lx",
43fe83
               driver, sconn, dconn, NULLSTR(dconnuri), vm, NULLSTR(xmlin),
43fe83
-              NULLSTR(dname), NULLSTR(uri), NULLSTR(graphicsuri), bandwidth,
43fe83
-              useParams, flags);
43fe83
+              NULLSTR(dname), NULLSTR(uri), NULLSTR(graphicsuri),
43fe83
+              NULLSTR(listenAddress), bandwidth, useParams, flags);
43fe83
 
43fe83
     /* Unlike the virDomainMigrateVersion3 counterpart, we don't need
43fe83
      * to worry about auto-setting the VIR_MIGRATE_CHANGE_PROTECTION
43fe83
@@ -3667,6 +3697,11 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
43fe83
                                     VIR_MIGRATE_PARAM_GRAPHICS_URI,
43fe83
                                     graphicsuri) < 0)
43fe83
             goto cleanup;
43fe83
+        if (listenAddress &&
43fe83
+            virTypedParamsAddString(&params, &nparams, &maxparams,
43fe83
+                                    VIR_MIGRATE_PARAM_LISTEN_ADDRESS,
43fe83
+                                    listenAddress) < 0)
43fe83
+            goto cleanup;
43fe83
     }
43fe83
 
43fe83
     if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED)
43fe83
@@ -3871,6 +3906,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
43fe83
                               const char *dconnuri,
43fe83
                               const char *uri,
43fe83
                               const char *graphicsuri,
43fe83
+                              const char *listenAddress,
43fe83
                               unsigned long flags,
43fe83
                               const char *dname,
43fe83
                               unsigned long resource,
43fe83
@@ -3885,10 +3921,11 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
43fe83
     bool useParams;
43fe83
 
43fe83
     VIR_DEBUG("driver=%p, sconn=%p, vm=%p, xmlin=%s, dconnuri=%s, "
43fe83
-              "uri=%s, graphicsuri=%s, flags=%lx, dname=%s, resource=%lu",
43fe83
+              "uri=%s, graphicsuri=%s, listenAddress=%s, flags=%lx, "
43fe83
+              "dname=%s, resource=%lu",
43fe83
               driver, sconn, vm, NULLSTR(xmlin), NULLSTR(dconnuri),
43fe83
-              NULLSTR(uri), NULLSTR(graphicsuri), flags, NULLSTR(dname),
43fe83
-              resource);
43fe83
+              NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress),
43fe83
+              flags, NULLSTR(dname), resource);
43fe83
 
43fe83
     /* the order of operations is important here; we make sure the
43fe83
      * destination side is completely setup before we touch the source
43fe83
@@ -3963,8 +4000,8 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
43fe83
 
43fe83
     if (*v3proto) {
43fe83
         ret = doPeer2PeerMigrate3(driver, sconn, dconn, dconnuri, vm, xmlin,
43fe83
-                                  dname, uri, graphicsuri, resource,
43fe83
-                                  useParams, flags);
43fe83
+                                  dname, uri, graphicsuri, listenAddress,
43fe83
+                                  resource, useParams, flags);
43fe83
     } else {
43fe83
         ret = doPeer2PeerMigrate2(driver, sconn, dconn, vm,
43fe83
                                   dconnuri, flags, dname, resource);
43fe83
@@ -3998,6 +4035,7 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
43fe83
                         const char *uri,
43fe83
                         const char *graphicsuri,
43fe83
                         const char *cookiein,
43fe83
+                        const char *listenAddress,
43fe83
                         int cookieinlen,
43fe83
                         char **cookieout,
43fe83
                         int *cookieoutlen,
43fe83
@@ -4032,8 +4070,8 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
43fe83
 
43fe83
     if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) {
43fe83
         ret = doPeer2PeerMigrate(driver, conn, vm, xmlin,
43fe83
-                                 dconnuri, uri, graphicsuri, flags, dname,
43fe83
-                                 resource, &v3proto);
43fe83
+                                 dconnuri, uri, graphicsuri, listenAddress,
43fe83
+                                 flags, dname, resource, &v3proto);
43fe83
     } else {
43fe83
         qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_PERFORM2);
43fe83
         ret = doNativeMigrate(driver, vm, uri, cookiein, cookieinlen,
43fe83
@@ -4198,6 +4236,7 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
43fe83
                      const char *dconnuri,
43fe83
                      const char *uri,
43fe83
                      const char *graphicsuri,
43fe83
+                     const char *listenAddress,
43fe83
                      const char *cookiein,
43fe83
                      int cookieinlen,
43fe83
                      char **cookieout,
43fe83
@@ -4224,7 +4263,8 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
43fe83
         }
43fe83
 
43fe83
         return qemuMigrationPerformJob(driver, conn, vm, xmlin, dconnuri, uri,
43fe83
-                                       graphicsuri, cookiein, cookieinlen,
43fe83
+                                       graphicsuri, listenAddress,
43fe83
+                                       cookiein, cookieinlen,
43fe83
                                        cookieout, cookieoutlen,
43fe83
                                        flags, dname, resource, v3proto);
43fe83
     } else {
43fe83
@@ -4242,7 +4282,7 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
43fe83
                                              flags, resource);
43fe83
         } else {
43fe83
             return qemuMigrationPerformJob(driver, conn, vm, xmlin, dconnuri,
43fe83
-                                           uri, graphicsuri,
43fe83
+                                           uri, graphicsuri, listenAddress,
43fe83
                                            cookiein, cookieinlen,
43fe83
                                            cookieout, cookieoutlen, flags,
43fe83
                                            dname, resource, v3proto);
43fe83
diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h
43fe83
index 4af5aed..cafa2a2 100644
43fe83
--- a/src/qemu/qemu_migration.h
43fe83
+++ b/src/qemu/qemu_migration.h
43fe83
@@ -43,11 +43,12 @@
43fe83
 
43fe83
 /* All supported migration parameters and their types. */
43fe83
 # define QEMU_MIGRATION_PARAMETERS                              \
43fe83
-    VIR_MIGRATE_PARAM_URI,          VIR_TYPED_PARAM_STRING,     \
43fe83
-    VIR_MIGRATE_PARAM_DEST_NAME,    VIR_TYPED_PARAM_STRING,     \
43fe83
-    VIR_MIGRATE_PARAM_DEST_XML,     VIR_TYPED_PARAM_STRING,     \
43fe83
-    VIR_MIGRATE_PARAM_BANDWIDTH,    VIR_TYPED_PARAM_ULLONG,     \
43fe83
-    VIR_MIGRATE_PARAM_GRAPHICS_URI, VIR_TYPED_PARAM_STRING,     \
43fe83
+    VIR_MIGRATE_PARAM_URI,              VIR_TYPED_PARAM_STRING, \
43fe83
+    VIR_MIGRATE_PARAM_DEST_NAME,        VIR_TYPED_PARAM_STRING, \
43fe83
+    VIR_MIGRATE_PARAM_DEST_XML,         VIR_TYPED_PARAM_STRING, \
43fe83
+    VIR_MIGRATE_PARAM_BANDWIDTH,        VIR_TYPED_PARAM_ULLONG, \
43fe83
+    VIR_MIGRATE_PARAM_GRAPHICS_URI,     VIR_TYPED_PARAM_STRING, \
43fe83
+    VIR_MIGRATE_PARAM_LISTEN_ADDRESS,   VIR_TYPED_PARAM_STRING, \
43fe83
     NULL
43fe83
 
43fe83
 
43fe83
@@ -124,6 +125,7 @@ int qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
43fe83
                                char **uri_out,
43fe83
                                virDomainDefPtr *def,
43fe83
                                const char *origname,
43fe83
+                               const char *listenAddress,
43fe83
                                unsigned long flags);
43fe83
 
43fe83
 int qemuMigrationPerform(virQEMUDriverPtr driver,
43fe83
@@ -133,6 +135,7 @@ int qemuMigrationPerform(virQEMUDriverPtr driver,
43fe83
                          const char *dconnuri,
43fe83
                          const char *uri,
43fe83
                          const char *graphicsuri,
43fe83
+                         const char *listenAddress,
43fe83
                          const char *cookiein,
43fe83
                          int cookieinlen,
43fe83
                          char **cookieout,
43fe83
-- 
43fe83
1.8.4
43fe83