Remote console setup

From OpenVZ Virtuozzo Containers Wiki
Revision as of 20:04, 26 May 2006 by Kir (talk | contribs) (Added some formatting to Netconsole)
Jump to: navigation, search

In case you are experiencing a kernel crash (oops) and have already checked your hardware, you should report what kernel says to the console to Bugzilla. Sometimes kernel crashes so badly that syslogd is not working and what kernel says it never written to a file. If this is the case, you have to catch what kernel says. There are several ways possible.


If kernel backtrace is not long enough there are chances that it can fit into a single screen. In that case, you can just make a photo of the kernel crash screen and attach it to the bug report. If you do not have a camera, you still can carefully write down (using a piece of paper and a pen, that is) what you see on the screen, and later type it into the bug report.

Serial console



This assumes you have not yet compiled netconsole as a module or into your kernel.

Edit your kernel configuration file, in my case mine was located at /usr/src/openvz/linux-2.6.16 edit .config with a text editor (nano .config) set netconsole to Y or M (depending on whether you want it as a module or built into the kernel, i installed it as a module)


save then recompile the kernel. cd /usr/src/openvz/linux-2.6.16 make bzImage && make modules && make modules_install update your bootloader for the new updated kernel. in my case i use lilo so i just type lilo at the prompt.

next you want your netconsole to send the request to somewhere.

modprobe netconsole netconsole=4444@,6666@

this will load the module in with your settings. replace your ip address with where is, eth0 is your network interface card. 6666 is the remote netconsole port (UDP), and replace with your remote netconsole server. also add in the mac address of your netconsole server, which in my case was 00:05:5D:34:11:AF.

then just setup netcat on your console server to listen on port 6666 UDP.

netcat -u -l -p6666

when your openvz kernel performs an OOPS, it will be captured on the netconsole server :)