From: Programmingkid <programmingkidx@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Peter Crosthwaite <crosthwaitepeter@gmail.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] feature idea: allow user to run custom scripts
Date: Mon, 28 Sep 2015 15:43:43 -0400 [thread overview]
Message-ID: <C2136F7E-FF67-4162-AE70-8188A44894A6@gmail.com> (raw)
In-Reply-To: <87vbavm27u.fsf@blackfin.pond.sub.org>
On Sep 28, 2015, at 3:29 AM, Markus Armbruster wrote:
> Programmingkid <programmingkidx@gmail.com> writes:
>
>> On Sep 27, 2015, at 10:30 PM, Michael Roth wrote:
>>
>>> Quoting Programmingkid (2015-09-27 20:49:24)
>>>>
>>>> On Sep 27, 2015, at 2:53 PM, Peter Crosthwaite wrote:
>>>>
>>>>> On Sun, Sep 27, 2015 at 3:13 AM, Peter Maydell
>>>>> <peter.maydell@linaro.org> wrote:
>>>>>> On 27 September 2015 at 04:39, Programmingkid
>>>>>> <programmingkidx@gmail.com> wrote:
>>>>>>> Would you be open to a feature that allows the user to select
>>>>>>> and run a custom file that has commands in it that would run
>>>>>>> in the monitor?
>>>>>>
>>>>>> Sounds like a VM management layer feature.
>>>>>>
>>>>>
>>>>> Should -monitor file:/foo/bar do something like this?
>>>>
>>>> If you are saying this command line argument loads monitor commands,
>>>> then it would only work when QEMU is first started. The feature I want
>>>> would work anytime during the running of QEMU.
>>>
>>> For that sort of flexibility I think writing commands to a socket via
>>> a script/program is simple enough that an additional interface doesn't
>>> seem worthwhile. Even our qtest unit tests use this approach. Plus you
>>> get the flexibility of a being able to branch based on the return
>>> value of commands (error-handling, stateful commands, incorporating
>>> output from a serial console, etc.). It seems like a nice feature but
>>> it's vastly inferior to what's possible with an external driver.
>>
>> How many people know how to communicate with QEMU via a socket?
>> How do you even do it? It doesn't sound very easy to do.
>
> It's easy, as QEMU command line goes:
>
> -qmp unix:test-hmp,server,nowait
>
> This is syntactic sugar for something like
>
> -chardev socket,id=compat_monitor1,path=sock-qmp,server=on,wait=off
> -mon mode=control,chardev=compat_monitor1
>
> The long form is more flexible. If you use it, don't use
> id=compat_monitor1, obviously.
>
> Easier on the eyes as configuration file for -readconfig:
>
> [chardev "qmp"]
> backend = "socket"
> path = "sock-qmp"
> server = "on"
> wait = "off"
>
> [mon "qmp"]
> mode = "control"
> chardev = "qmp"
>
>> A menu item
>> that displays a file open dialog is very easy to use. The user just selects
>> a file and QEMU loads and runs all the commands in it. This feature
>> would make QEMU easier to use. It would also make QEMU easily
>> expandable. Typing long commands in the monitor is difficult and
>> error prone. Saving these commands in a file would make it much
>> easier for the user. An example command someone could put in a
>> file is sending Control-Alt-Delete to the emulator. Another command
>> could be mounting an image file. This feature would make things
>> much easier for the user.
>
> You didn't mention you're talking about a *GUI* feature.
I'm thinking it would be easier to send in the patch rather than talk about
what this feature could be.
next prev parent reply other threads:[~2015-09-28 19:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-27 3:39 [Qemu-devel] feature idea: allow user to run custom scripts Programmingkid
2015-09-27 10:13 ` Peter Maydell
2015-09-27 18:53 ` Peter Crosthwaite
2015-09-28 1:49 ` Programmingkid
2015-09-28 2:30 ` Michael Roth
2015-09-28 3:10 ` Programmingkid
2015-09-28 7:29 ` Markus Armbruster
2015-09-28 19:43 ` Programmingkid [this message]
2015-09-28 19:44 ` Peter Maydell
2015-09-28 19:48 ` Programmingkid
2015-09-29 13:11 ` Dr. David Alan Gilbert
2015-09-29 13:17 ` Programmingkid
2015-09-29 13:23 ` Dr. David Alan Gilbert
2015-09-30 5:01 ` Paolo Bonzini
2015-09-29 13:24 ` Peter Maydell
2015-09-29 13:31 ` Dr. David Alan Gilbert
2015-09-30 7:48 ` Markus Armbruster
2015-09-30 8:14 ` Dr. David Alan Gilbert
2015-09-30 10:53 ` Peter Maydell
2015-09-30 14:23 ` Programmingkid
2015-10-01 10:36 ` Paolo Bonzini
2015-10-02 11:20 ` Kevin Wolf
2015-10-01 7:06 ` Markus Armbruster
2015-10-02 12:33 ` Daniel P. Berrange
2015-10-02 13:28 ` Programmingkid
2015-10-01 6:55 ` Markus Armbruster
2015-10-01 8:01 ` Dr. David Alan Gilbert
2015-10-02 12:30 ` Daniel P. Berrange
2015-10-02 13:33 ` Dr. David Alan Gilbert
2015-10-02 14:28 ` Daniel P. Berrange
2015-10-02 14:37 ` Programmingkid
2015-10-02 16:21 ` Eric Blake
2015-10-02 17:57 ` Programmingkid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2136F7E-FF67-4162-AE70-8188A44894A6@gmail.com \
--to=programmingkidx@gmail.com \
--cc=armbru@redhat.com \
--cc=crosthwaitepeter@gmail.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).