qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/12] migration-local: add option to commandlin


From: Lei Li
Subject: Re: [Qemu-devel] [PATCH 11/12] migration-local: add option to commandline for incoming-local
Date: Mon, 05 Aug 2013 11:21:02 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 08/03/2013 03:46 AM, Michael R. Hines wrote:
On 07/25/2013 04:18 PM, Lei Li wrote:
Signed-off-by: Lei Li <address@hidden>
---
  qemu-options.hx |    9 +++++++++
  vl.c            |   14 ++++++++++++++
  2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index 8355f9b..a975e83 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2912,6 +2912,15 @@ STEXI
  Prepare for incoming migration, listen on @var{port}.
  ETEXI

+DEF("incoming-local", HAS_ARG, QEMU_OPTION_incoming_local, \
+ "-incoming-local p prepare for localhost incoming migration, listen on domain unix socket p\n",
+    QEMU_ARCH_ALL)
+STEXI
address@hidden -incoming-local @var{port}
address@hidden -incoming-local
+Prepare for localhost incoming migration, listen on @var{port}
+ETEXI
+
  DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
      "-nodefaults     don't create default devices\n", QEMU_ARCH_ALL)
  STEXI
diff --git a/vl.c b/vl.c
index 767e020..b820db5 100644
--- a/vl.c
+++ b/vl.c
@@ -2854,6 +2854,7 @@ int main(int argc, char **argv, char **envp)
      const char *vga_model = "none";
      const char *pid_file = NULL;
      const char *incoming = NULL;
+    const char *incoming_local = NULL;
  #ifdef CONFIG_VNC
      int show_vnc_port = 0;
  #endif
@@ -3691,6 +3692,10 @@ int main(int argc, char **argv, char **envp)
                  incoming = optarg;
                  runstate_set(RUN_STATE_INMIGRATE);
                  break;
+            case QEMU_OPTION_incoming_local:
+                incoming_local = optarg;
+                runstate_set(RUN_STATE_INMIGRATE);
+                break;
              case QEMU_OPTION_nodefaults:
                  default_serial = 0;
                  default_parallel = 0;
@@ -4377,6 +4382,15 @@ int main(int argc, char **argv, char **envp)
              error_free(local_err);
              exit(1);
          }
+    } else if (incoming_local) {
+        Error *local_err = NULL;
+ qemu_start_local_incoming_migration(incoming_local, &local_err);
+        if (local_err) {
+            fprintf(stderr, "-incoming_local %s: %s\n", incoming_local,
+                    error_get_pretty(local_err));
+            error_free(local_err);
+            exit(1);
+        }
      } else if (autostart) {
          vm_start();
      }

Why can't we do: -incoming "local:" instead of adding a new flag?

Would be much more compatible with libvirt tools if you just add a new URI prefix.....

Good suggestion, thanks!


- Michael




--
Lei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]