User`s guide
Installation and Preliminary Operations 27
Installing OpenVZ Software
Downloading and Installing OpenVZ Kernel
First of all, you should download the kernel binary RPM from
http://openvz.org/download/kernel/. You need only one kernel RPM, so please choose the
appropriate kernel binary depending on your hardware:
If there is more than one CPU available on your Hardware Node (or a CPU with
hyperthreading), select the
vzkernel-smp RPM.
If there is more than 4 Gb of RAM available, select the
vzkernel-enterprise RPM.
Otherwise, select the uniprocessor kernel RPM (
vzkernel-version).
Next, you shall install the kernel RPM of your choice on your Hardware Node by issuing the
following command:
# rpm -ihv vzkernel-name*.rpm
Note: You should not use the rpm –U command (where -U stands for "upgrade"); otherwise,
all the kernels currently installed on the Node will be removed.
Configuring Boot Loader
In case you use the GRUB loader, it will be configured automatically. You should only make
sure that the lines below are present in the
/boot/grub/grub.conf file on the Node:
title Fedora Core (2.6.8-022stab029.1)
root (hd0,0)
kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5 quiet rhgb
initrd /initrd-2.6.8-022stab029.1.img
However, we recommend that you configure this file in the following way:
Change Fedora Core to OpenVZ (just for clarity, so the OpenVZ kernels will not be
mixed up with non OpenVZ ones).
Remove all extra arguments from the
kernel line, leaving only the root=... parameter.
At the end, the modified grub.conf file should look as follows:
title OpenVZ (2.6.8-022stab029.1)
root (hd0,0)
kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5
initrd /initrd-2.6.8-022stab029.1.img
Setting sysctl parameters
There are a number of kernel limits that should be set for OpenVZ to work correctly. OpenVZ is
shipped with a tuned
/etc/sysctl.conf file. Below are the contents of the relevant part of
/etc/sysctl.conf: