Some feature requests for guest consoles
Hi,
Mike H <[email protected]> made a feature request in:
https://lists.xenproject.org/archives/html/xen-users/2022-03/msg00009.html
for the Xen guest console as connected to with "xl console" to correctly support the terminal size rather than always being 80x20.
Additionally I wondered about some other features:
- Ability to remap the "magic sysrq" key combination which is ctrl-o, and possibly disable it while leaving "xl sysrq" and /proc/sysrq-trigger in the guest generally working.
Reason: guest administrators are often inexperienced with the details of Xen. ctrl-o is a bad choice because it's actually the "save buffer" shortcut in the popular editor nano. On more than one occasion I have had guest administrators be editing a file with nano on their console, they go to save it with ctrl-o which appears to do nothing (because Xen is waiting for the sysrq command that follows), so they do ctrl-o again which is taken as being command 'o' - immediate power off! I have had an emergency support ticket about this because "my guest randomly crashed while I was editing a file".
I would therefore like to remap "magic sysrq" to something more obscure, or failing that disable it in guests as we/they will use "xl sysrq" instead.
A couple of other things which may already be possible but I don't know how, so if anyone's done it maybe they could give hints:
- Systematically and automatically log all guest console activity to individual files without interfering with the ability to use "xl console"
- Somehow plumb the xenconsole pty to a web terminal like xterm.js
Thanks!
Andy
Quoted 15 lines · Andy Smith
- Ability to remap the "magic sysrq" key combination which is ctrl-o, and possibly disable it while leaving "xl sysrq" and
/proc/sysrq-triggerin the guest generally working.Reason: guest administrators are often inexperienced with the details of Xen. ctrl-o is a bad choice because it's actually the "save buffer" shortcut in the popular editor nano. On more than one occasion I have had guest administrators be editing a file with nano on their console, they go to save it with ctrl-o which appears to do nothing (because Xen is waiting for the sysrq command that follows), so they do ctrl-o again which is taken as being command 'o' - immediate power off! I have had an emergency support ticket about this because "my guest randomly crashed while I was editing a file".
Quoted 3 lines
I would therefore like to remap "magic sysrq" to something more obscure, or failing that disable it in guests as we/they will use "xl sysrq" instead.
Without meaning to turn down the request, I'd like to point out that
- as of Linux commit 368c1e3249af (over 13 years ago) pressing ^O twice does not have the described effect, but actually means an individual ^O to be sent to the application,
- independent of that commit ^O followed by another ^O would not trigger the 'o' sysrq handler, but do nothing; said sysrq handler would be triggered when ^O is followed by O or o (without Ctrl),
- this sysrq triggering model isn't specific to Xen (and hence sending the request here may not reach the necessary audience) - besides being implemented in code common to all hvc drivers, it is additionally handled by some non-hvc tty drivers as well.
Jan