serial-console: Unable to use SYSREQ magic keys on a serial console connected to an ARM VM
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
Using 'az serial-console' to connect to a Linux VM under ARM, it is not possible to send a SYSREQ magic key to the kernel:
I press Ctrl-]
I press 's'
I press ´h' (for help) or any other valid -- or, in fact, invalid -- key
I get no response at all, and 'dmesg' or the kernel log shows no data.
Logging in to the VM, and executing (as root) the equivalent command works:
```
root@ma2 [ ~ ]# echo 9 > /proc/sysrq-trigger
[24876.936961] sysrq: Changing Loglevel
[24876.941766] sysrq: Loglevel set to 9
root@ma2 [ ~ ]# echo h > /proc/sysrq-trigger
[24894.966270] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)
```
On X64_64 VMs 'az serial-console' correctly allows me to send a sysreq magic key.
Also, Ctrl-] followed by 'q' correctly ends the serial console session. I can also successfully send a magic key when using the Azure Portal's serial console.
### Related command
```
az serial console connect -n -g
```
### Errors
No output is generated by this failure in the serial console
### Issue script & Debug output
'az --debug serial-console connect -n -g ' fails to work with what looks like a heisenbug:
```
cli.azure.cli.core.command_recommender: "-n" is an invalid parameter for command "serial-console connect".
cli.azure.cli.core.command_recommender: "-g" is an invalid parameter for command "serial-console connect".
cli.azure.cli.core.azclierror: NoneType: None
cli.azure.cli.core.azclierror: unrecognized arguments: -n ma2 -g REDACTED-rg1
az_command_data_logger: unrecognized arguments: -n ma2 -g REDACTED-rg1
```
### Expected behavior
In the serial console, a sequence Ctrl-], s, one additional letter should trigger the Linux sysreq magical key on an ARM-based VM
### Environment Summary
$ az --version
azure-cli 2.50.0
core 2.50.0
telemetry 1.0.8
Extensions:
serial-console 0.1.6
ssh 2.0.0
Dependencies:
msal 1.22.0
azure-mgmt-resource 23.1.0b2
Python location '/opt/az/bin/python3'
Extensions directory '/home/REDACTED/.azure/cliextensions'
Python (Linux) 3.10.10 (main, Jun 29 2023, 11:09:14) [GCC 11.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.