Xen Hypervisor Debugging

Recently, I encountered random crashes on a Xen server. There was no output, no syslog entry, not even a remote syslog could help. In such a case, it may be helpful to access the hypervisor itself and hope that it still responds.

What you need is a serial console to the virtualization host. I personally prefer the utility “screen” to access all kinds of serial consoles. The usage is straight forward. For example, to access the first serial device with a speed of 57600, use the following command:

screen /dev/ttyS0 57600

By default, both, screen and the Xen hypervisor use CTRL-A as a hot key. If you ever looked at “xm dmesg”, it tells you by default:

(XEN) *** Serial input -> DOM0 (type ‘CTRL-a’ three times to switch input to Xen)

To do this from within screen, you have to type the following keys three times:

CTRL-A A

CTRL-A and the following A send a CTRL-A to the serial console. If everything worked out correctly, you will see the following output:

(XEN) *** Serial input -> Xen (type ‘CTRL-a’ three times to switch input to DOM0)

There, you can obtain a list of available commands by pressing ‘H’. Before proceeding, make sure to log all of the output. Screenlogging is enabled with the key combination

CTRL-A SHIFT-H

Note, that pressing ‘*’ for all diagnostics may fail due to the needed time for the report generation. In doubt, just try again or generate the reports one by another.

If you prefer to have the hypervisor at the serial console instead of Domain-0, you can also switch the default with a hypervisor command (just put it behind xen.gz in grub/menu.lst):

conswitch=qx

This changes the hot key for switching to CTRL-Q, and if you have the x as second letter, it also switches the default input from Domain-0 to the hypervisor.

In the end, the problem I had with my Host was a hardware problem. This could be worked around by disabling speedstep. For more information about that issue, see bnc#659284.

Advertisements
This entry was posted in openSUSE, Xen. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s