From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoF2Z-0005gq-L1 for qemu-devel@nongnu.org; Sun, 16 Jun 2013 11:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoF2Y-0000R9-Nh for qemu-devel@nongnu.org; Sun, 16 Jun 2013 11:38:51 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:54001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoF2Y-0000Qv-3B for qemu-devel@nongnu.org; Sun, 16 Jun 2013 11:38:50 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 16 Jun 2013 21:03:03 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id BB34AE0043 for ; Sun, 16 Jun 2013 21:08:07 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5GFcmcc28311558 for ; Sun, 16 Jun 2013 21:08:48 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5GFciPq019330 for ; Sun, 16 Jun 2013 15:38:44 GMT From: Lei Li Date: Sun, 16 Jun 2013 23:37:32 +0800 Message-Id: <1371397053-4503-7-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1371397053-4503-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1371397053-4503-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 6/7] migration-local: add option to command line for -incoming-local List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lagarcia@br.ibm.com, aliguori@us.ibm.com, Lei Li , quintela@redhat.com Signed-off-by: Lei Li --- 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 bf94862..bb1a88a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2913,6 +2913,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 +@item -incoming-local @var{port} +@findex -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 9f8fd6e..496a264 100644 --- a/vl.c +++ b/vl.c @@ -2856,6 +2856,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 @@ -3755,6 +3756,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; @@ -4418,6 +4423,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(); } -- 1.7.7.6