
81
Configuring OpenVZ
In order to make OpenVZ successfully accomplish its tasks you need to understand how to
configure OpenVZ correctly. This chapter explains what configuration parameters OpenVZ has
and how they affect its behavior.
Matrix of OpenVZ Configuration Files
There are a number of files responsible for the OpenVZ system configuration. These files are
located in the
/etc
directory on the Hardware Node; a list of these files is given below:
/etc/sysconfig/vz
OpenVZ global configuration file. This file keeps
system-wide settings, affecting VPS and OpenVZ
template default location, global network settings
and so on.
/etc/sysconfig/vz-scripts/
vpsid
.conf
Private configuration file owned by VPS numbered
vpsid
. File keeps VPS specific settings – its
resource management parameters, location of
private area, IP address and so on.
/etc/sysconfig/vz-
scripts/ve-
name
.conf-sample
Sample files, containing a number of default VPS
configurations, which may be used as a reference
for VPS creation. Following samples are shipped
with OpenVZ:
light
,
vps.basic
.
Also, you
may create your new samples customized for your
own needs.
/etc/sysctl.conf
Kernel parameters. You should adjust a number of
kernel
sysctl
parameters stored in the
/etc/sysctl.conf
file.
/etc/cron.d/vpsreboot
Configuration file for the
cron
daemon. Using
this file, OpenVZ emulates the “
reboot
”
command working in VPS.
/etc/sysconfig/vz-
scripts/dists/
dist_name
.conf
Configuration files used to determine what scripts
are to be run on performing some operations in the
VPS context (e.g. on adding a new IP address to
the VPS). These scripts are different from OpenVZ
action scripts and depend on the Linux version the
given VPS is running.