From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGqup-0000qJ-N1 for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:22:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGqum-000539-WC for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:21:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGqum-000534-Om for qemu-devel@nongnu.org; Thu, 29 Jan 2015 10:21:52 -0500 Message-ID: <54CA500E.8030608@redhat.com> Date: Thu, 29 Jan 2015 08:21:50 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422543997-22808-1-git-send-email-dgilbert@redhat.com> <1422543997-22808-2-git-send-email-dgilbert@redhat.com> <20150129151527.GE1102@redhat.com> In-Reply-To: <20150129151527.GE1102@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FCxjARnjsCne3v3W2Ax7oAJwbVOtq9rOv" 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: "Daniel P. Berrange" , "Dr. David Alan Gilbert (git)" Cc: amit.shah@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, quintela@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FCxjARnjsCne3v3W2Ax7oAJwbVOtq9rOv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/29/2015 08:15 AM, Daniel P. Berrange wrote: >> ./bin/qemu-system-x86_64 -nographic -nodefaults -qmp-command '{"execut= e": "migrate-set-capabilities", "arguments":{"capabilities":[{"capability= ":"xbzrle","state":true}]}}' -qmp-command '{"execute": "query-migrate-cap= abilities"}' -incoming tcp::444 >=20 > 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. >=20 > 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. >=20 > eg, >=20 > # 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --FCxjARnjsCne3v3W2Ax7oAJwbVOtq9rOv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUylAOAAoJEKeha0olJ0Nq1coH/0TQcas36FUqpwq28kqrhPzf SuSyxr59wugyB7wczk6hLPKCXyvO7j2Dzq6HagpOdTGh6OeZpl4NrVhPVjj8jg+j TWWaZk10/1rL9ZxGpQonLmCxl88YODH05EQhc0ZClC1SjwthwJdOkmdUU6gugDhL hjxNPW8BCoE/6u8TGYpm81uRZD1k0haKuNIFacQiDQW1x32wBfSa+EJAukxHqxhU hh5o0aiy7odRzC8996kLg1WKPI//ep8TaufrIH2+eIaGibs7zTZDXsRWRW71cVF+ aiwyEbZ6eZov9MqT72lyzn9Gedycsy90hS5ulnzy2OlEPyO1x/LKMfnDB+I90TY= =CQ1o -----END PGP SIGNATURE----- --FCxjARnjsCne3v3W2Ax7oAJwbVOtq9rOv--