From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGrQT-0001Me-Uh for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:54:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGrQP-0000R5-Od for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:54:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGrQP-0000Qs-G2 for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:54:33 -0500 Date: Thu, 29 Jan 2015 15:54:26 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20150129155425.GE2391@work-vm> References: <1422543997-22808-1-git-send-email-dgilbert@redhat.com> <1422543997-22808-2-git-send-email-dgilbert@redhat.com> <20150129151527.GE1102@redhat.com> <54CA500E.8030608@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54CA500E.8030608@redhat.com> Subject: Re: [Qemu-devel] [RFC 1/1] Execute arbitrary QMP commands from command line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: amit.shah@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, quintela@redhat.com * Eric Blake (eblake@redhat.com) wrote: > On 01/29/2015 08:15 AM, Daniel P. Berrange wrote: > > >> ./bin/qemu-system-x86_64 -nographic -nodefaults -qmp-command '{"execute": "migrate-set-capabilities", "arguments":{"capabilities":[{"capability":"xbzrle","state":true}]}}' -qmp-command '{"execute": "query-migrate-capabilities"}' -incoming tcp::444 > > > > I'm unclear how we'd easily deal with the response from commands > > invoked this way, to get replies and/or errors. Also, it might > > be the case that we need to conditionally run certain commands > > depending on the result of earlier commands. > > > > Wouldn't it make more sense to simply add a 'migrate_incoming' QMP > > command, and stop using -incoming altogether, so we just have normal > > QMP access ? > > I agree - shoving more into the command line is the wrong direction; > full power is better obtained by making the command line be the minimal > needed to get into QMP control, and let QMP kick things off. > > > > > eg, > > > > # qemu-system-x86_64 ....device args... -S > > (qmp) ....arbitrary QMP commands .. > > (qmp) {"execute":"migrate-incoming", "arguments": { "uri": "tcp::44" }} > > The idea of a QMP command to trigger incoming migration looks > reasonable. We can probably use a qapi union for a nicer syntax, > something like: > > {"execute": "migrate-incoming", "arguments": { > "type": "tcp", "port": 44 } } > vs. > {"execute": "migrate-incoming", "arguments": { > "type": "fd", "fd": 0 } } > vs. > {"execute": "migrate-incoming", "arguments": { > "type": "exec", "command": [ "cat", "/path/to/file" ] } } > > and so forth. Compared to just taking a URI argument that Dan suggested, that's quite a bit of rework to do the reworking of each transport which is pretty trivial. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK