From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqqB8-0001MK-83 for qemu-devel@nongnu.org; Thu, 03 Jan 2013 14:10:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqqB6-0003sy-Sb for qemu-devel@nongnu.org; Thu, 03 Jan 2013 14:10:10 -0500 Received: from mail-ie0-f181.google.com ([209.85.223.181]:55904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqqB6-0003sd-N9 for qemu-devel@nongnu.org; Thu, 03 Jan 2013 14:10:08 -0500 Received: by mail-ie0-f181.google.com with SMTP id 16so18504001iea.26 for ; Thu, 03 Jan 2013 11:10:08 -0800 (PST) Sender: fluxion Date: Thu, 3 Jan 2013 13:09:13 -0600 From: mdroth Message-ID: <20130103190913.GD17859@vm> References: <20130102230405.GB17859@vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Using QEMU guest agent to run programs from guest path] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Erlon Cruz Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com On Thu, Jan 03, 2013 at 11:06:02AM -0200, Erlon Cruz wrote: > On Wed, Jan 2, 2013 at 9:04 PM, mdroth wrote: > > > On Mon, Dec 31, 2012 at 06:14:59PM -0200, Erlon Cruz wrote: > > > Hi, > > > > > > > > > I needed to run an external program in a guest machine. Once this must be > > > triggered by the host, I first thought in qemu-ga. > > > Is that possible? In QEMU help page and in the code I couldn't find such > > > capability. > > > So Im thinking In to implement a new GA QMP command that can run generic > > > programs in the guest. It would be receive/return something like this: > > > > > > {"execute":"execvp", > > > "arguments":{"command":"/bin/ls","cmdargs":"-la","timeout":20}} > > > {"return": {"status": "0", "stdout": "aGVsbG8gd29ybGQhCg==", "stderr": > > ""}} > > > > > > Any thoughts/ideas about this? > > > > I sent an RFC for this a while back: > > > > http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg00722.html > > > > At the time the interface seemed a bit tedious, but AFAIK it's the only > > kind of approach that'll work for longer-running commands with lots of > > output, so I might just clean it up and re-spin the series. > > > > > Why you say tedious? The interface seems to have a very wide usage for The parameter passing for guest commands was kludgy (list of json objects rather than a list of parameter strings), but I think we can handle that now with the "gen: no" option to the code parser indicating we'll handle it manually. I'm not sure about the guest-file-open-pipe stuff either. It seems clumsy, but I can't think of a better approach. I'll look at it and shoot to get in by 1.4, but feature freeze is only a couple weeks away so it may have to wait till 1.5. > several scenarios and fits perfectly for what we are trying to do. Why it > didn't go upstream? I think it would be nice to roll that up again. > > Erlon > > > > > > Kind Regards, > > > Erlon > >