Magic sysrq on Linux guest, under a Linux host

Discussions related to using VirtualBox on Linux hosts.

Magic sysrq on Linux guest, under a Linux host

Postby wizeman » 10. Oct 2008, 14:34

Hi,

How can I trigger the kernel's Magic Sysrq functionality on a Linux guest, considering I'm running a Linux host?

The documentation provides workarounds for the host trapping the Ctrl+Alt+Fx and Ctrl+Alt+Del key sequences, but not Alt+Sysrq+x.

I have tried setting up a serial console to workaround this problem. The serial console works fine when set up in 2 different ways except that I can't trigger the sysrq:

  1. socat listening on the local domain socket, connected to a pseudo-tty device as a master, and then using picocom or minicom to connect to the tty device as a slave. It works as a serial console, but the break sequence gets ignored.
  2. socat listening on the local domain socket, connected to a socket listening on a TCP port. Then I used telnet to connect to that port. This also works as a serial console, but again telnet's "send break" command doesn't seem to do anything.


Any suggestions? Note that I don't have a real serial port on this laptop, and "echo x > /proc/sysrq-trigger" is not a solution for me because the kernel may be stuck.

Thanks in advance.
- Ricardo
wizeman
 
Posts: 1
Joined: 10. Oct 2008, 14:14

Re: Magic sysrq on Linux guest, under a Linux host

Postby mmarionsd » 22. Sep 2011, 01:33

Was curious if you ever found a solution to this. I'm in the same position. Client image hangs up inside vbox (works fine in kvm, xen, vmware, etc) and need to kick off a kdump to try to find why it's hanging, but while I can get on the serial console, can't seem to get send brk to actually work with the sysrq bits.

-Mike
mmarionsd
 
Posts: 1
Joined: 22. Sep 2011, 01:22
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: SLED10&11

Re: Magic sysrq on Linux guest, under a Linux host

Postby halfdog » 11. Nov 2011, 08:53

I had the same problem during kernel crash debugging. On linux host, one can send request to guest using

VBoxManage controlvm [vbox-name] keyboardputscancode 1d 38 54 [request type press/release] d4 b8 9d

This command can also be embedded into automated scripts or desktop menus. See also http://www.halfdog.net/Misc/TipsAndTricks/VirtualBox.html#MagicSysrq for some additional info.
halfdog
 
Posts: 2
Joined: 11. Nov 2011, 08:28
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: 10 different so far


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 10 guests