From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH73J-00026p-4l for qemu-devel@nongnu.org; Fri, 30 Jan 2015 03:35:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH73D-0000HN-UT for qemu-devel@nongnu.org; Fri, 30 Jan 2015 03:35:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH73D-0000H9-MJ for qemu-devel@nongnu.org; Fri, 30 Jan 2015 03:35:39 -0500 From: Markus Armbruster 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> Date: Fri, 30 Jan 2015 09:35:36 +0100 In-Reply-To: <54CA500E.8030608@redhat.com> (Eric Blake's message of "Thu, 29 Jan 2015 08:21:50 -0700") Message-ID: <8761bowtrb.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: quintela@redhat.com, liang.z.li@intel.com, "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org, amit.shah@redhat.com Eric Blake writes: > 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. Seconded. >> >> 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. Yup.