[virt-tools-list] [PATCH] virt-manager: console: add submenu for Alt-Sysrq key combos

Cole Robinson crobinso at redhat.com
Tue Dec 13 15:29:17 UTC 2016


On 12/13/2016 03:23 AM, Martin Wilck wrote:
> On Mon, 2016-12-12 at 21:11 -0500, Cole Robinson wrote:
>> On 12/06/2016 02:40 PM, Martin Wilck wrote:
>>> This patch adds a submenu with Alt-SysRq key combinations to the
>>> "Send Key" menu of the virt-manager console. As this is useful
>>> mostly
>>> for Linux guests, I added the Linux key "translations" to the menu.
>>>
>>> Feedback is welcome.
>>>
>>
>> Thanks for the patch, but I don't like the idea of an explicit sysrq
>> list.
>> It's linux guest specific, which isn't a stopper on its own, except
>> even
>> within linux distros it's not universal: at least fedora only enables
>> a subset
>> of the sysrq sequences by default, I assume that's the case for other
>> distros
>> as well. 
> 
> Hm, the same reasoning could be applied to key combos that are already
> present in the menu, such as ctlr-alt-backspace.

Notice I didn't defend the existing selection :) Those should be reworked too.

Even ctrl-alt-delete
> doesn't necessarily have an effect.
> 

ctrl-alt-delete may not work for some OS but it's absolutely essential for
some windows versions, you can't even log in without it. So that's actually
the element that most deserves to be in the list.

>> In this case the UI would lead people down the wrong path and I can
>> imagine fielding bug requests about why a virt-manager menu entry
>> didn't do
>> what it claims to do (like kill-all-tasks)
> 
> Such reports would be quite easily dismissed, in particular because the
> kernel prints a message on the console telling the user that the sysrq
> combo is disabled.
> 
> I agree that my proposed labeling of the options with strings like
> "kill-all-tasks" isn't optimal. Simply labeling it "Ctrl-Alt-t" would
> be less misleading, because that wouldn't suggest a specific effect.
> 
> I'd be happy to resend my patch with those labels changed. I'd also
> agree to add functionality make the presence of this menu depend on a
> (global) configuration option that the user must enable explicitly. 
> 
>> I'd rather see this solved with two bits:
>>
>> - A menu option to pass a manual keycombo to the guest. So it would
>> allow the
>> user to press alt+sysrq+s individually, then click a 'send' button or
>> similar.
>> Slow, but flexible
> 
> IMO that would likely cause user frustration.
> 

Rethinking a bit, we could have an option like:

- Alt+Sysrq...

Which opens a small dialog that takes the extra Key. We could use that pattern
for Ctrl+Alt as well to drop the backspace option and some or all of the 1-12
options, I'd need to think about it more.

Just for reference, virtualbox exposes:

- Ctrl-alt-delete
- Ctrl-alt-backspace
- Ctrl-break
- Insert
- Printscreen
- Alt-Printscreen

>> - A way for users to add their own permanent keycombos to the UI.
>> This is
>> discussed a bit in https://bugzilla.redhat.com/show_bug.cgi?id=101466
>> 6 . If we
>> go with the above 'manual' option, we could add a checkbox like
>> 'Remember this
>> key combo' that would permanently add it to the UI
> 
> That would be nice, but definitely outside my own scope, I just need a
> quick implementation of Alt-Sysrq.
> 
> Moreover, this is sort of over-engineered. The list of key combos to be
> supported is actually quite short; it must contain only combos that are
> a) important for some relevant guest OS and b) can't easily be typed
> the ordinary way in a VM console. Adding predefined sets of well-known
> key combos (perhaps depending on guest OS) would still make sense, even
> if a more generic approach was implemented. In my opinion, a useful
> predefined set for Linux would have to include (at least some of) the
> Alt-Sysrq combos.

UI elements have a cost though, in testing, maintenance, possible user
confusion leading to bug reports which take time/energy to triage, etc. Those
factors have to be weighed against the value of the feature, such as how many
people will use it, how critical it is for those users, and if there are
workarounds (which there are, see below).

> 
> Lastly, I'd appreciate to have a solution for Alt-Sysrq quickly. My
> patch could be a temporary solution while a more generic approach is
> under development. 

If you need a quick solution, there's 'virsh send-key' from the command line.
If you are doing sequence of sysrq invocations it's probably even quicker if
you stuff the series in a shell script.

The Red Hat bugzilla you mentioned has been open for
> 3 years ... is there hope for a full solution to be implemented anytime
> soon?

Discussions like this tend to bump things up my mental priority list, but I
can't give a time guarantee.

- Cole




More information about the virt-tools-list mailing list