From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6BN3-0008I6-Gg for qemu-devel@nongnu.org; Sun, 04 Aug 2013 23:22:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6BMu-0007SB-ES for qemu-devel@nongnu.org; Sun, 04 Aug 2013 23:22:09 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:58390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6BMt-0007RT-Oq for qemu-devel@nongnu.org; Sun, 04 Aug 2013 23:22:00 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Aug 2013 08:44:44 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id C358D1258051 for ; Mon, 5 Aug 2013 08:51:26 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r753LnqK38600912 for ; Mon, 5 Aug 2013 08:51:49 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r753LqL9004239 for ; Mon, 5 Aug 2013 13:21:52 +1000 Message-ID: <51FF1A1E.6000907@linux.vnet.ibm.com> Date: Mon, 05 Aug 2013 11:21:02 +0800 From: Lei Li MIME-Version: 1.0 References: <1374783499-2550-1-git-send-email-lilei@linux.vnet.ibm.com> <1374783499-2550-12-git-send-email-lilei@linux.vnet.ibm.com> <51FC0CA9.2000508@linux.vnet.ibm.com> In-Reply-To: <51FC0CA9.2000508@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/12] migration-local: add option to commandline for incoming-local List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael R. Hines" Cc: aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, lagarcia@br.ibm.com, pbonzini@redhat.com, rcj@linux.vnet.ibm.com 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 >> --- >> 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 >> +@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 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