* [Qemu-devel] Using QEMU guest agent to run programs from guest path @ 2012-12-31 20:14 Erlon Cruz 2013-01-02 23:04 ` mdroth 0 siblings, 1 reply; 5+ messages in thread From: Erlon Cruz @ 2012-12-31 20:14 UTC (permalink / raw) To: mdroth; +Cc: qemu-devel, lcapitulino [-- Attachment #1: Type: text/plain, Size: 575 bytes --] 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? Kind Regards, Erlon [-- Attachment #2: Type: text/html, Size: 926 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Using QEMU guest agent to run programs from guest path 2012-12-31 20:14 [Qemu-devel] Using QEMU guest agent to run programs from guest path Erlon Cruz @ 2013-01-02 23:04 ` mdroth 2013-01-03 13:06 ` Erlon Cruz 0 siblings, 1 reply; 5+ messages in thread From: mdroth @ 2013-01-02 23:04 UTC (permalink / raw) To: Erlon Cruz; +Cc: qemu-devel, lcapitulino 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. > > Kind Regards, > Erlon ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Using QEMU guest agent to run programs from guest path 2013-01-02 23:04 ` mdroth @ 2013-01-03 13:06 ` Erlon Cruz 2013-01-03 19:09 ` [Qemu-devel] Using QEMU guest agent to run programs from guest path] mdroth 0 siblings, 1 reply; 5+ messages in thread From: Erlon Cruz @ 2013-01-03 13:06 UTC (permalink / raw) To: mdroth; +Cc: qemu-devel, lcapitulino [-- Attachment #1: Type: text/plain, Size: 1329 bytes --] On Wed, Jan 2, 2013 at 9:04 PM, mdroth <mdroth@linux.vnet.ibm.com> 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 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 > [-- Attachment #2: Type: text/html, Size: 2214 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Using QEMU guest agent to run programs from guest path] 2013-01-03 13:06 ` Erlon Cruz @ 2013-01-03 19:09 ` mdroth 2013-01-04 10:46 ` Erlon Cruz 0 siblings, 1 reply; 5+ messages in thread From: mdroth @ 2013-01-03 19:09 UTC (permalink / raw) To: Erlon Cruz; +Cc: qemu-devel, lcapitulino On Thu, Jan 03, 2013 at 11:06:02AM -0200, Erlon Cruz wrote: > On Wed, Jan 2, 2013 at 9:04 PM, mdroth <mdroth@linux.vnet.ibm.com> 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 > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Using QEMU guest agent to run programs from guest path] 2013-01-03 19:09 ` [Qemu-devel] Using QEMU guest agent to run programs from guest path] mdroth @ 2013-01-04 10:46 ` Erlon Cruz 0 siblings, 0 replies; 5+ messages in thread From: Erlon Cruz @ 2013-01-04 10:46 UTC (permalink / raw) To: mdroth; +Cc: qemu-devel, lcapitulino [-- Attachment #1: Type: text/plain, Size: 648 bytes --] > 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. > > Hmmm, I see, not really sure if I can help too. I know almost nothing about the parser. :/ 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. > > Nice, I guess that will take around 3 months right? Erlon [-- Attachment #2: Type: text/html, Size: 1078 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-04 10:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-12-31 20:14 [Qemu-devel] Using QEMU guest agent to run programs from guest path Erlon Cruz 2013-01-02 23:04 ` mdroth 2013-01-03 13:06 ` Erlon Cruz 2013-01-03 19:09 ` [Qemu-devel] Using QEMU guest agent to run programs from guest path] mdroth 2013-01-04 10:46 ` Erlon Cruz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).