Changes

Jump to: navigation, search

Remote console setup

761 bytes added, 08:27, 27 May 2006
Fixed formatting and expanded Netconsole
== Netconsole ==
This assumes === Kernel recompilation ===If you have not yet compiled use binary kernel from openvz.org, it already has netconsole as a module or into your kernelcompiled in, so just skip to next section.
Edit If you build the kernel yourself, you might need to check if netconsole is compiled. To that effect, change to your kernel source directory and grep your kernel configuration file, in my case mine was located at <tt>.config</tt> for NETCONSOLE:<pre># cd /usr/src/openvz/linux-2.6.16edit # grep NETCONSOLE .config</pre> If you see nothing or "# CONFIG_NETCONSOLE is not set" you need to recompile the kernel. Edit your kernel configuration file <tt>.config </tt> with a text editor (<tt>nano .config</tt> or <tt>vi .config</tt>)set . Set netconsole to Y or M (depending on whether you want it as a module or built into the kernel, i installed ; I have compiled it as a module):
<pre>CONFIG_NETCONSOLE=m</pre>
save Save the file, then recompile the kernel. : cd /usr/src/openvz/linux-2.6.16<pre># make bzImage && make modules && make modules_installupdate </pre>Update your bootloader for the new updated kernel. in In my case i I use lilo LILO so i I just type lilo at the prompt. Reboot into new kernel. === Setting up OpenVZ side === Next you want your netconsole to send the request to somewhere. Load netconsole module, specifying the remote server parameters: <pre># modprobe netconsole netconsole=4444@10.0.2.1/eth0,6666@10.0.2.2/00:05:5D:34:11:AF</pre>
next you want This will load the module with your settings. Replace your local IP address with where <tt>10.0.2.1</tt> is, <tt>eth0</tt> with your network interface card device, <tt>6666</tt> with the remote netconsole to send port (UDP), and <tt>10.0.2.2</tt> with your remote netconsole server IP. Also add in the request to somewheremac address of your remote netconsole server, which in my case was 00:05:5D:34:11:AF.You can get the MAC address using arp utility:
<pre>modprobe netconsole netconsole=4444@# ping -c 1 10.0.2.2# /eth0,6666@sbin/arp -i 10.0.2.2? (10.0.2.1/2) at 00:05:5D:34:11:AF[ether] on eth2</pre>
this will load the module in with your settings. replace your ip address with where 10.0.2.2 is, eth0 is your network interface card. 6666 is the === Setting up remote netconsole port (UDP), and replace 10.0.2.1 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.side ===
then just setup Setup netcat on your console server to listen on port 6666 UDP.:
<pre>netcat -u -l -p6666</pre>
when When your openvz kernel performs an OOPSprints something on the console, it the text will be also captured on the this netconsole server :) enjoy.

Navigation menu