Received: from [140.186.70.92] (port=41700 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcK7X-0001u3-A5 for qemu-devel@nongnu.org; Mon, 10 Jan 2011 10:57:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcK7U-0001mb-29 for qemu-devel@nongnu.org; Mon, 10 Jan 2011 10:57:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcK7T-0001mL-RR for qemu-devel@nongnu.org; Mon, 10 Jan 2011 10:57:20 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0AFvI0U012829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Jan 2011 10:57:18 -0500 Date: Mon, 10 Jan 2011 17:57:13 +0200 From: Alon Levy Subject: Re: [Qemu-devel] [PATCH 2/6] spice: client migration. Message-ID: <20110110155712.GA17952@playa.tlv.redhat.com> References: <1294666311-23457-1-git-send-email-kraxel@redhat.com> <1294666311-23457-3-git-send-email-kraxel@redhat.com> <20110110154934.GP2723@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110110154934.GP2723@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Gerd Hoffmann , qemu-devel@nongnu.org On Mon, Jan 10, 2011 at 03:49:34PM +0000, Daniel P. Berrange wrote: > On Mon, Jan 10, 2011 at 02:31:47PM +0100, Gerd Hoffmann wrote: > > Handle spice client migration, i.e. inform a spice client connected > > about the new host and connection parameters, so it can move over the > > connection automatically. > > > > Signed-off-by: Gerd Hoffmann > > --- > > hmp-commands.hx | 20 ++++++++++++++++++++ > > qmp-commands.hx | 35 +++++++++++++++++++++++++++++++++++ > > ui/qemu-spice.h | 1 + > > ui/spice-core.c | 40 ++++++++++++++++++++++++++++++++++++++++ > > 4 files changed, 96 insertions(+), 0 deletions(-) > > > > diff --git a/hmp-commands.hx b/hmp-commands.hx > > index df134f8..e6d8f36 100644 > > --- a/hmp-commands.hx > > +++ b/hmp-commands.hx > > @@ -815,6 +815,26 @@ ETEXI > > }, > > > > STEXI > > +@item spice_migrate_info @var{hostname} @var{port} @var{tls-port} @var{cert-subject} > > +@findex spice_migrate_info > > +Set the spice connection info for the migration target. The spice > > +server will ask the spice client to automatically reconnect using the > > +new parameters (if specified) once the vm migration finished > > +successfully. > > +ETEXI > > > > + > > +#if defined(CONFIG_SPICE) > > + { > > + .name = "spice_migrate_info", > > + .args_type = "hostname:s,port:i?,tls-port:i?,cert-subject:s?", > > + .params = "hostname port tls-port cert-subject", > > + .help = "send migration info to spice client", > > + .user_print = monitor_user_noop, > > + .mhandler.cmd_new = mon_spice_migrate, > > + }, > > +#endif > > + > > +STEXI > > @item snapshot_blkdev > > @findex snapshot_blkdev > > Snapshot device, using snapshot file as target if provided > > diff --git a/qmp-commands.hx b/qmp-commands.hx > > index 56c4d8b..24ada04 100644 > > --- a/qmp-commands.hx > > +++ b/qmp-commands.hx > > @@ -503,6 +503,41 @@ EQMP > > }, > > > > SQMP > > +spice_migrate_info > > +------------------ > > + > > +Set the spice connection info for the migration target. The spice > > +server will ask the spice client to automatically reconnect using the > > +new parameters (if specified) once the vm migration finished > > +successfully. > > + > > +Arguments: > > + > > +- "hostname": migration target hostname (json-string) > > +- "port": spice tcp port for plaintext channels (json-int, optional) > > +- "tls-port": spice tcp port for tls-secured channels (json-int, optional) > > +- "cert-subject": server certificate subject (json-string, optional) > > + > > +Example: > > + > > +-> { "execute": "spice_migrate_info", > > + "arguments": { "hostname": "virt42.lab.kraxel.org", "port": 1234 } } > > +<- { "return": {} } > > I'm wondering whether we should make this command more > generic, because I could likely write up a VNC extension > that provides the same functionality that SPICE has here. > so, 'graphics_migrate_info @var{spice|vnc|...} ...other vars..' Considering it isn't actually just graphics how about client_migrate_info? > > Regards, > Daniel >