Parallels Virtuozzo Containers 4.7 For Linux Reference Guide Vz Ref

User Manual: parallels Virtuozzo Containers - 4.7 - Linux - Reference Guide Free User Guide for Parallels Virtuozzo Containers Software, Manual

Open the PDF directly: View PDF PDF.
Page Count: 176

DownloadParallels Virtuozzo Containers 4.7 For Linux - Reference Guide Vz Ref
Open PDF In BrowserView PDF
Parallels Virtuozzo
Containers 4.7 for Linux
Reference Guide

Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.

Parallels Holdings, Ltd.
c/o Parallels International GMbH.
Parallels International GmbH
Vordergasse 49
CH8200 Schaffhausen
Switzerland
Tel: + 41 526320 411
Fax: + 41 52672 2010
www.parallels.com
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
This product is protected by United States and international copyright laws. The product’s underlying technology,
patents, and trademarks are listed at http://www.parallels.com/trademarks.
Microsoft, Windows, Windows Server, Windows NT, Windows Vista, and MS-DOS are registered trademarks of Microsoft
Corporation.
Apple, Mac, the Mac logo, Mac OS, iPad, iPhone, iPod touch, FaceTime HD camera and iSight are trademarks of Apple
Inc., registered in the US and other countries.
Linux is a registered trademark of Linus Torvalds.
All other marks and names mentioned herein may be trademarks of their respective owners.

Contents
Preface ....................................................................................................................... 7
About Parallels Virtuozzo Containers ................................................................................ 8
About This Guide ............................................................................................................ 9
Organization of This Guide .......................................................................................................9
Documentation Conventions ................................................................................................. 10

Getting Help.................................................................................................................. 11
Feedback...................................................................................................................... 12

Configuring Parallels Virtuozzo Containers 4.7 ...................................................... 13
Matrix of Parallels Virtuozzo Containers Configuration Files ............................................. 14
Global Parallels Virtuozzo Containers Configuration File ......................................................... 16
Container Configuration File................................................................................................... 23
Linux Distribution Configuration Files ..................................................................................... 31
Network Classes Definition File .............................................................................................. 33
vzup2date Configuration File ................................................................................................. 34
vzup2date-mirror Configuration File ....................................................................................... 35
vzvpn Configuration File ......................................................................................................... 38
vzreport Configuration File ..................................................................................................... 39
Kernel Parameters ................................................................................................................. 40
Offline Management Configuration Files ................................................................................. 41
vzlmond Configuration File..................................................................................................... 42
vzstat Configuration File......................................................................................................... 44
vzrmond Configuration File .................................................................................................... 46
vzstatrep Configuration File ................................................................................................... 49
Backup Configuration File ...................................................................................................... 51
vzrhnproxy Configuration File ................................................................................................. 54
vzpkgproxy Configuration File ................................................................................................ 55
vztt Configuration File ............................................................................................................ 56

Managing Parallels Virtuozzo Containers Scripts ............................................................ 56
Overview ............................................................................................................................... 57
Parallels Virtuozzo Containers Action Scripts ......................................................................... 58

Contents

Parallels Virtuozzo Containers Command-Line Interface ...................................... 60
Matrix of Parallels Virtuozzo Containers Command Line Utilities ...................................... 61
vzctl .............................................................................................................................. 64
vzctl create ............................................................................................................................ 66
vzctl delete and vzctl destroy ................................................................................................. 67
vzctl mount and vzctl umount ................................................................................................ 67
vzctl start, vzctl stop, vzctl restart, and vzctl status................................................................ 68
vzctl set ................................................................................................................................. 70
vzctl unset ............................................................................................................................. 79
vzctl exec, vzctl exec2, and vzctl enter .................................................................................. 79
vzctl recover and vzctl reinstall .............................................................................................. 80
vzctl quotaon, vzctl quotaoff, and vzctl quotainit .................................................................... 81
vzctl suspend and vzctl resume ............................................................................................. 81
vzctl convert .......................................................................................................................... 82
vzctl runscript ........................................................................................................................ 82

vzlist ............................................................................................................................. 83
vzlist Output Parameters and Their Specifiers ........................................................................ 85

vzquota......................................................................................................................... 89
vzquota init ............................................................................................................................ 90
vzquota drop ......................................................................................................................... 91
vzquota on and vzquota off ................................................................................................... 91
vzquota setlimit ..................................................................................................................... 92
vzquota setlimit2 ................................................................................................................... 92
vzquota stat and vzquota show ............................................................................................. 93

Licensing Utilities ........................................................................................................... 94
vzlicload ................................................................................................................................ 94
vzlicupdate ............................................................................................................................ 95
vzlicview ................................................................................................................................ 96

Migration Utilities ........................................................................................................... 97
vzmigrate ............................................................................................................................... 97
vzmlocal .............................................................................................................................. 100
vzp2v................................................................................................................................... 101

Backing-Up Utilities ..................................................................................................... 102
vzabackup ........................................................................................................................... 103
vzarestore............................................................................................................................ 106

Contents

EZ Template Management Utilities ............................................................................... 108
vzpkg install template .......................................................................................................... 109
vzpkg update template ........................................................................................................ 109
vzpkg remove template ....................................................................................................... 110
vzpkg list ............................................................................................................................. 111
vzpkg info ............................................................................................................................ 113
vzpkg status ........................................................................................................................ 116
vzpkg install ......................................................................................................................... 117
vzpkg update ...................................................................................................................... 119
vzpkg remove ...................................................................................................................... 120
vzpkg link ............................................................................................................................ 121
vzpkg create cache ............................................................................................................. 122
vzpkg update cache ............................................................................................................ 123
vzpkg remove cache ........................................................................................................... 124
vzpkg localinstall .................................................................................................................. 125
vzpkg localupdate ............................................................................................................... 126
vzpkg upgrade .................................................................................................................... 127
vzpkg fetch .......................................................................................................................... 128
vzpkg clean ......................................................................................................................... 129
vzpkg update metadata ....................................................................................................... 130
vzpkg upgrade area............................................................................................................. 130
vzmktmpl ............................................................................................................................. 131
vzpkgproxy .......................................................................................................................... 135
vzrhnproxy ........................................................................................................................... 136

Supplementary Tools................................................................................................... 137
vzup2date ........................................................................................................................... 137
vzup2date-mirror ................................................................................................................. 145
vzfsutil ................................................................................................................................. 146
vzcache ............................................................................................................................... 148
vzps and vztop .................................................................................................................... 149
vzsetxinetd .......................................................................................................................... 150
vzdqcheck ........................................................................................................................... 151
vzdqdump and vzdqload ..................................................................................................... 152
vznetstat .............................................................................................................................. 153
vzcpucheck ......................................................................................................................... 153

Contents

vzmemcheck ....................................................................................................................... 154
vzcalc .................................................................................................................................. 154
vzcheckovr .......................................................................................................................... 154
pstat .................................................................................................................................... 155
vzpid ................................................................................................................................... 161
vzsplit .................................................................................................................................. 161
vzcfgscale ........................................................................................................................... 162
vzcfgvalidate ........................................................................................................................ 163
vzcfgconvert ........................................................................................................................ 163
vzstatrep ............................................................................................................................. 164
vzreport ............................................................................................................................... 165
vzhwcalc ............................................................................................................................. 166
vzveconvert ......................................................................................................................... 167
vznetcfg............................................................................................................................... 169
vzmtemplate ........................................................................................................................ 170

Glossary ................................................................................................................. 171
Index ...................................................................................................................... 173

CHAPTER 1

Preface
In This Chapter
About Parallels Virtuozzo Containers ....................................................................... 8
About This Guide ................................................................................................... 9
Getting Help ........................................................................................................... 11
Feedback ............................................................................................................... 12

Preface

About Parallels Virtuozzo Containers
Parallels Virtuozzo Containers is a patented OS virtualization solution. It creates isolated partitions
or Containers on a single physical server and OS instance to utilize hardware, software, data center
and management effort with maximum efficiency. The basic Parallels Virtuozzo Containers
capabilities are:
•

Intelligent Partitioning—Division of a server into as many as hundreds of Containers with
full server functionality.

•

Complete Isolation—Containers are secure and have full functional, fault and performance
isolation.

•

Dynamic Resource Allocation—CPU, memory, network, disk and I/O can be changed
without rebooting.

•

Mass Management—Suite of tools and templates for automated, multi-Container and multiserver administration.

The diagram below represents a typical model of the Parallels Virtuozzo Containers system
structure:

8

Preface

The Parallels Virtuozzo Containers OS virtualization model is streamlined for the best performance,
management, and efficiency. At the base resides a standard Host operating system which can be
either Windows or Linux. Next is the virtualization layer with a proprietary file system and a kernel
service abstraction layer that ensure the isolation and security of resources between different
Containers. The virtualization layer makes each Container appear as a standalone server. Finally,
the Container itself houses the application or workload.
The Parallels Virtuozzo Containers OS virtualization solution has the highest efficiency and
manageability making it the best solution for organizations concerned with containing the IT
infrastructure and maximizing the resource utilization. The Parallels Virtuozzo Containers complete
set of management tools and unique architecture makes it the perfect solution for easily
maintaining, monitoring, and managing virtualized server resources for consolidation and business
continuity configurations.

About This Guide
This guide is a complete reference on all Parallels Virtuozzo Containers configuration files and
Hardware Node command-line utilities. It familiarizes you with the way to configure Parallels
Virtuozzo Containers to meet your requirements and to perform various tasks by using the
corresponding Parallels command line utilities.
The primary audience for this guide is anyone who is looking for an explanation of a particular
configuration option, does not understand a Parallels file format, needs help for a particular
command, or is seeking for a command to perform a certain task.

Organization of This Guide
Chapter 2, Configuring Parallels Virtuozzo Containers 4.7, explains how to configure Parallels
Virtuozzo Containers configuration files to make your Containers function more effectively.
Chapter 3, Parallels Virtuozzo Containers Command Line Interface, describes all available
Hardware Node command-line utilities together with the options and switches that can be passed
to them.

9

Preface

Documentation Conventions
Before you start using this guide, it is important to understand the documentation conventions used
in it.
The table below presents the existing formatting conventions.
Formatting convention

Special Bold

Type of Information

Example

Items you must select, such as
Go to the Resources tab.
menu options, command buttons,
or items in a list.
Titles of chapters, sections, and
subsections.

Read the Basic Administration chapter.

Italics

Used to emphasize the
These are the so-called EZ templates.
importance of a point, to
introduce a term or to designate a To destroy a Container, type vzctl
command-line placeholder, which destroy ctid.
is to be replaced with a real name
or value.

Monospace

The names of commands, files,
and directories.

Use vzctl start to start a Container.

Preformatted

On-screen computer output in
your command-line sessions;
source code in XML, C++, or
other programming languages.

Saved parameters for Container
101

Monospace Bold

What you type, as contrasted with # rpm –V virtuozzo-release
on-screen computer output.

Key+Key

Key combinations for which the
user must press and hold down
one key and then press another.

Ctrl+P, Alt+F4

Besides the formatting conventions, you should also know about the document organization
convention applied to Parallels documents: chapters in all guides are divided into sections, which,
in their turn, are subdivided into subsections. For example, About This Guide is a section, and
Documentation Conventions is a subsection.

10

Preface

Getting Help
In addition to this guide, there are a number of other resources available for Parallels Virtuozzo
Containers 4.7 which can help you use the product more effectively. These resources include:
•

Manuals:
• Parallels Virtuozzo Containers 4.7 Evaluation Guide. This guide is destined to introduce
you to the main features of Parallels Virtuozzo Containers 4.7 and to its underlying
technology, to help you set up an environment for evaluating the Parallels Virtuozzo
Containers major features, and to suggest the relevant procedures for this evaluation.
• Getting Started With Parallels Virtuozzo Containers 4.7 for Linux. This guide provides
basic information on how to install Parallels Virtuozzo Containers 4.7 on your server, create
new Containers, and perform main operations on them.
• Parallels Virtuozzo Containers 4.7 for Linux Installation Guide. This guide provides
exhaustive information on the process of installing, configuring, and deploying your Parallels
Virtuozzo Containers system. As distinct from the Getting Started With Parallels Virtuozzo
Containers 4.7 for Linux guide, it contains a more detailed description of all the operations
needed to install and set Parallels Virtuozzo Containers 4.7 to work including planning the
structure of your network, performing the Parallels Virtuozzo Containers unattended
installation, etc. Besides, it does not include the description of any Container-related
operations.
• Parallels Virtuozzo Containers 4.7 for Linux User's Guide. This guide provides
comprehensive information on Parallels Virtuozzo Containers 4.7 covering the necessary
theoretical conceptions as well as all practical aspects of working with Parallels Virtuozzo
Containers. However, it does not deal with the process of installing and configuring your
system.
• Parallels Virtuozzo Containers 4.7 for Linux Templates Management Guide. This guide
is meant to provide complete information on Parallels Virtuozzo Containers templates - an
exclusive Parallels technology allowing you to efficiently deploy standard Linux applications
inside your Containers and to greatly save the Hardware Node resources (physical memory,
disk space, etc.).

•

Help systems:
• Parallels Management Console Help. This help system provides detailed information on
Parallels Management Console - a graphical user interface tool for managing Hardware
Nodes and their Containers.
• Parallels Virtual Automation Online Help. This help system shows you how to work with
Parallels Virtual Automation - a tool providing you with the ability to manage Hardware
Nodes and their Containers with the help of a standard Web browser on any platform.
• Parallels Power Panel Online Help. This help system deals with Parallels Power Panel - a
means for administering individual Containers through a common Web browser on any
platform.
11

Preface

Feedback
If you spot a typo in this guide, or if you have an opinion about how to make this guide more
helpful, you can share your comments and suggestions with us by completing the Documentation
Feedback form on our website (http://www.parallels.com/en/support/usersdoc/).

12

CHAPTER 2

Configuring Parallels Virtuozzo Containers
4.7
In order to make Parallels Virtuozzo Containers 4.7 successfully accomplish its tasks, you need to
understand how to configure the Parallels Virtuozzo Containers software correctly. This chapter
explains what configuration parameters Parallels Virtuozzo Containers has and how they affect its
behavior.

In This Chapter
Matrix of Parallels Virtuozzo Containers Configuration Files ...................................... 14
Managing Parallels Virtuozzo Containers Scripts ..................................................... 56

Configuring Parallels Virtuozzo Containers 4.7

Matrix of Parallels Virtuozzo Containers
Configuration Files
There are a number of files responsible for the Parallels Virtuozzo Containers system configuration.
Most of the files are located in the /etc directory on the Node. However, some configuration files
are stored in the /etc directory inside the Service Container, on the Backup Node, inside a
Container, or on a dedicated server. In case a configuration file is located in a place other than the
Hardware Node, we point clearly the exact position (the Service Container, etc.) where it can be
found.
A list of configuration files is presented in the table below:
/etc/vz/vz.conf

The Parallels Virtuozzo Containers global
configuration file. This file keeps system-wide settings
affecting the Container and template default
location, global network settings, and so on.

/etc/vz/conf/.conf

The private configuration file owned by a Container
numbered . The file keeps Container
specific settings: its resource management
parameters, the location of private area, IP
addresses, and so on.

/etc/vz/conf/ve-.conf.sample

Sample files containing a number of resources
settings that can be used as the basis for creating
Containers.

/etc/vz/conf/dists/ The configuration files used to determine what scripts
.conf
are to be run on performing some operations in the
Container context (e.g. on adding a new IP address
to the Container). These scripts are different from
Parallels Virtuozzo Containers action scripts and
depend on the Linux version the given Container is
running.
/etc/sysconfig/vzsve

The configuration file used for the Service Container
creation by vzsveinstall.

/etc/sysconfig/vzagent/

Parallels Agent configuration files.

/etc/vz/conf/networks_classes

The definition of network classes, used by traffic
shaping and bandwidth management in Parallels
Virtuozzo Containers.

/etc/sysconfig/vzup2date/vzup2date.con This file specifies the default connection parameters
f
for the vzup2date utility.
//.conf

This configuration file specifies the default connection
parameters for the vzup2date-mirror utility. It
should be located on the computer where you are
planning to run vzup2date-mirror.

/etc/cron.d/vereboot

The configuration file for the cron daemon. Using
this file, Parallels Virtuozzo Containers emulates the
“reboot” command working inside a Container.

14

Configuring Parallels Virtuozzo Containers 4.7

/etc/vzvpn/vzvpn.conf

The configuration file used to define the parameters
for establishing a private secure channel to the
Parallels support team server.

/etc/vzreport.conf

The configuration file used to define the parameters
for sending your problem report to the Parallels
support team.

/etc/sysctl.conf

Kernel parameters. Parallels Virtuozzo Containers
adjusts a number of kernel sysctl parameters, and
modifies the default /etc/sysctl.conf file.

/etc/vzredirect.d/*.conf

These files define the offline management modes for
controlling Containers by Container administrators.

/etc/vzlmond.conf

This configuration file defines the parameters used by
the vzlmond daemon to collect information on the
main Hardware Node resources consumption.

/etc/vzstat.conf

The file lists the warning and/or error levels for a
number of resource control parameters. If a
parameter hits the warning or error value, the
vzstat utility will display this parameter in yellow or
red.

/etc/vzstatrep.conf

This configuration file is located on the Monitor Node
and used by the vzstatrep utility when generating
statistic reports and graphics on the Hardware Node
resource consumption and sending these reports to
the Node administrator.

/etc/vzbackup.conf

The global configuration file residing on the Backup
Node and determining the global Container backup
settings.

/etc/vz/pkgproxy/rhn.conf

The Red Hat Network (RHN) Proxy Server
configuration file used by the vzrhnproxy utility
when setting up the RHN Proxy Server. This file can
be located on any computer where the vzrhnproxy
package is installed.

/etc/vzpkgpoxy/vzpkgproxy.conf

This configuration file is used by the vzpkgproxy
utility when creating special caching proxy servers for
OS and application EZ templates. The file can be
located on any computer where the vzpkgproxy
package is installed.

/etc/vztt/vztt.conf

This configuration file is used by the vzpkg utility
when managing OS and application EZ templates.

15

Configuring Parallels Virtuozzo Containers 4.7

Global Parallels Virtuozzo Containers Configuration File
Parallels Virtuozzo Containers keeps its system wide configuration parameters in the
/etc/vz/vz.conf configuration file. This file is in shell format. Keep in mind that Parallels
Virtuozzo Containers scripts source this file – thus, shell commands in this file will cause system to
execute them under root account. Parameters in this file are presented in the form
PARAMETER=”value”. Logically all the parameters belong to the following groups: global
parameters, logging, disk quota, template, network traffic, Containers, validation and
overcommitment, supplementary parameters, and name-based hosting parameters. Below is the
description of all parameters defined in this version of Parallels Virtuozzo Containers.
Global parameters
Parameter

Description

VIRTUOZZO

This can be either “yes” or “no”. Parallels Virtuozzo yes
Containers System V startup script checks this
parameter. If set to “no”, then Parallels Virtuozzo
Containers modules are not loaded. You might set
it to “no” if you want to perform system
maintenance and do not want to bring up all
Containers on the Node.

HTTP_PROXY

Specifies either the hostname or the IP address of the HTTP proxy server. After setting this
parameter and in case you use an HTTP proxy
server for handling all HTTP requests, the Parallels
Virtuozzo Containers utilities communicating with
the outer world through HTTP (e.g. the vzreport
utility) will use this server for managing all your
HTTP messages (e.g. sending your problem
report).

ACTIONLOGDIR

This is the directory where vzctl keeps a log of
its actions in the format suitable for Parallels
Virtuozzo Containers statistics daemon hwcoll.

/vz/actionlog

LOCKDIR

Actions on a Container should be serialized, since
two simultaneous operations on the same
Container may break its consistency. Parallels
Virtuozzo Containers keeps lock files in this
directory in order to serialize access to one
Container.

/vz/lock

REMOVEMIGRATED

Specifies whether the private area and the
configuration file of the Container moved to a new
Node with the vzmigrate command should be
destroyed on the Source Node (the value of the
parameter is set to yes) or renamed to have the
.migrated suffix (the value of the parameter is
set to no). You may wish to leave the Container
private area and the configuration file to make
migration faster. This configuration value can be
overridden by the vzmigrate command-line
options.

no

16

Default value

Configuring Parallels Virtuozzo Containers 4.7

VE0CPUUNITS

CPU weight designated for the Node itself.

1000

OFFLINE_MANAGEMENT

Specifies whether Containers can be managed by
the Container administrator by means of the
services indicated in the OFFLINE_SERVICE
parameter.

yes

OFFLINE_SERVICE

These services correspond to the names of the
files in the /etc/vzredirect.d directory, each
file defining at what port the service will be
accessible and to what Container the requests
coming to this port will be redirected. These
services will be accessible to those Containers
which have the OFFLINE_MANAGEMENT
parameter set to "yes".

vzpp-plesk vzpp

BURST_CPU_AVG_USAGE

The CPU usage limit, in percent, set for the
Container. This limit is calculated as the ratio of
the current Container CPU usage to the CPU limit
(i.e to the value of the CPULIMIT parameter) set
for the Container in its configuration file. If the limit
is not specified, the full CPU power of the Node is
considered as the CPU limit. Upon exceeding the
BURST_CPU_AVG_USAGE limit, the
BURST_CPULIMIT limit is applied to the given
Container.

disabled

This parameter can be redefined by the
BURST_CPU_AVG_USAGE parameter set in the
Container configuration file.
BURST_CPULIMIT

The CPU power limit, in per cent, the Container
cannot exceed. The limitations set in this
parameter are applied to any Container exceeding
the limit specified in the BURST_CPU_AVG_USAGE
parameter.
This parameter can be redefined by the
BURST_CPULIMIT parameter set in the Container
configuration file.

VEFORMAT

vz4
Determines the VZFS version to be applied to all
Containers that will be created on the given Node:

•

If you wish your Containers to use the
benefits of the VZFS v2 technology, the
value of this parameter should be set to
vz4.

•

If you wish your Containers to be based
on VZFS v1, you should make sure that
the value of this parameter is set to vz3.

17

Configuring Parallels Virtuozzo Containers 4.7

VZMOUNTS

/vz
Defines the partitions which will be automatically
mounted by the /etc/init.d/vz script after
the Node boot. This script will check (by calling the
fsck utility) and mount all the partitions specified
as the value of this parameter, listed in
/etc/fstab file on the Node, and having the
noauto flag set for them in this file.

CEP

Enables/disables your participation in the Parallels yes
Customer Experience Program (CEP). The
following options are available:

•

yes enables CEP

•

no disables CEP

Logging parameters affect the vzctl utility logging behavior.
Parameter

Description

Default value

LOGGING

This parameter defines whether vzctl should log its
actions.

yes

LOGFILE

File where vzctl logs its actions.

/var/log/vzctl.log

LOG_LEVEL

There are three levels of logging defined in the current
version of Parallels Virtuozzo Containers.

0

The table below describes the possible values of the LOG_LEVEL parameter and their meanings:
Log level

Information to be logged

0

Actions of vzctl on Containers like start, stop, create, destroy, mount, umount.

1

Level 1 logs events, calls to vzctl helper scripts located in /etc/vz/conf (such as vzstart and vz-stop) and situations when the init process of the Container is killed on
Container stop after timeout.

2

Level 0 and level 1 logging events, plus template version used for Container creation and
calls to mount and quota operations with parameters.

Disk quota parameters allow you to control the disk usage by the Containers:
Parameter

Description

Default value

DISK_QUOTA

Defines whether to turn on disk quota for Containers. If set to
“no” then disk space and inodes accounting will be disabled.

yes

VZFASTBOOT

Determines the Container quota reinitialization procedure when no
the Node is booted after an incorrect shutdown. If set to "no",
the disk quota is reinitialized for each Container during the Node
startup and only then are the Containers started, which results
in a long Node and Containers booting time. When set to "yes",
the Container quota reinitialization procedure depends on the
Container quota files state:

•

18

Those Containers whose quota files
(/var/vzquota/quota.) have a "dirty"
flag set, meaning that their contents are inconsistent
with the real Containers usage, are started without

Configuring Parallels Virtuozzo Containers 4.7
the quota reinitialization. After all the Containers with
"dirty" flags are launched, they are restarted one by
one to reinitialize their respective quotas.
•

Those Containers whose quota files are absent from
the Node or corrupted are started only after their
quota has been successfully reinitialized.

In general, setting the VZFASTBOOT parameter to "yes" allows
you to considerably reduce the Node and Containers downtime
after the incorrect Node shutdown.

Network traffic parameters define whether you want to account bandwidth consumed by
Containers and whether you want to limit bandwidth available to Containers:
Parameter

Description

Default value

TRAFFIC_SHAPING

Traffic shaping allows you to limit the bandwidth
consumed by Containers for outgoing traffic. If it is set
to “yes”, then limitations will be turned on.

no

BANDWIDTH

This is the list of network interfaces on which we want eth0:102400
to shape the traffic and their speed in the form of
“dev:rate”. The rate is measured in Kbits/s. If you want
to shape traffic on more than one interface, set this
parameter to “dev1:rate1 dev2:rate2”. For example, for
two 100 Mbits/s Ethernet cards, set it to “eth0:102400
eth1:102400”.

TOTALRATE

Size of the bandwidth pool for all Containers. It is the
upper limit for the bandwidth available to all your
Containers and is specified in the form of
“dev:class:rate”. The rate is measured in Kbits/s.
Containers can consume bandwidth up to this limit in
addition to the limit specified by the RATE parameter.
Default value corresponds to 4 Mbits/s limit for the
Class 1 Containers.

RATE

eth0:1:8
Default bandwidth guaranteed to a Container for
outgoing traffic if the Container configuration file does
not explicitly specify a different value. This value is in
the same format as TOTALRATE and its default value is
“eth0:1:8”. The rate is measured in Kbits/s. Note that
8 Kbits/s, offered by the default configuration, is the
guarantee and the Container cannot consume less
than this value and more than the sum of this value
and TOTALRATE.

IPV6

Enables (yes) or disables (no) the support for using
IPv6 addresses with Containers. If enabled, you can
assign IPv6 addresses to Containers and manage
them in the same way you would manage IPv4
addresses (e.g., set network classes for IPv6
addresses or connect to Containers with Parallels
Power Panel using IPv6 addresses).

USE_VENET_MASK

Enables (yes) or disables (no) the possibility of setting no
network masks for Containers operating in the venet0
networking mode.

eth0:1:4096

yes

19

Configuring Parallels Virtuozzo Containers 4.7

VZ_TOOLS_BCID

Enables disk I/O limits for vzabackup,
vzarestore, and vzmigrate operations. Make
sure that the value of this parameter does not coincide
with the ID assigned to some of your Containers. For
example, if you leave the default value 2, ensure that
no Container with ID 2 exists on the Node.

no

VZ_TOOLS_IOLIMIT

Sets the disk I/O limit for the backup, restore, and
migration operations, in bytes per second.

10485760

Template parameters allow to configure the template area location.
Parameter

Description

Default value

TEMPLATE

This is the directory where to find templates. It is not
recommended to redefine this option since all the
templates built by Parallels use the default directory.

/vz/template

Container default parameters either affect new Container creation or represent Container
parameters that can be overridden in the Container configuration file:
Parameter

Description

Default value

VE_ROOT

This is a path to the Container root directory where
the private area is mounted.

/vz/root/CT_ID

VE_PRIVATE

This is a path to the Container private area, where
VZFS keeps its private data. VZFS implementation
requires VE_PRIVATE reside within a single
physical partition.

/vz/private/CT_ID

CONFIGFILE

The default configuration file sample to be used for
the Container creation; it may be overridden with
the --config option of the vzctl create
command.

basic

DEF_OSTEMPLATE

The default OS template to be used for the
Container creation; it may be overridden with the -pkgset command-line option for vzctl
create.

.centos-5-x86

IPTABLES

Only those iptables modules will be loaded to
the Containers hosted on the Node which are
indicated as the value of this parameter and only if
they are loaded on the Node itself as well.

ip_tables ipt_REJECT
ipt_tos ipt_limit
ipt_multiport
iptable_filter
iptable_mangle
ipt_TCPMSS ipt_tcpmss
ipt_ttl ipt_length

VE_ENVIRONMENT

Additional environment variables to be passed to
the Container init process. Should be provided
as any number of name=value pairs separated by
spaces.

Container validation and overcommitment parameters define whether the Container configuration
should be validated and the Node overcommitment checked on a Container startup:
Parameter

Description

Default value

VE_VALIDATE_ACTION

Defines whether the
Container configuration

none

20

Configuring Parallels Virtuozzo Containers 4.7
should be validated when a
Container is started. If this
parameter is set to
“warning”, a warning is
displayed in case of
misconfiguration. If set to
“error”, the Container is not
started in case of
misconfiguration. If set to
“fix”, the configuration is
automatically corrected.
OVERCOMMITMENT_ACTION

none
Defines whether the Node
should be checked for the
overcommitment of
resources when a Container
is started. If this parameter is
set to “warning”, a warning
is displayed in case of
overcommitment. If set to
“error”, the Container that
would cause
overcommitment is not
started. When checking for
overcommitment, the
following five parameters are
checked.

OVERCOMMITMENT_LEVEL_LOWMEM

The percentage of
committed memory residing
at lower addresses and
directly accessed by the
kernel.

OVERCOMMITMENT_LEVEL_MEMSWAP

90
The percentage of
committed memory available
for applications including
both RAM and swap space.

OVERCOMMITMENT_LEVEL_ALLOCMEM

100
The allocation memory
commitment level is the ratio
of the memory size
guaranteed to be available
for allocation to the capacity
of the system.

OVERCOMMITMENT_LEVEL_ALLOCMEM_T The number shows how
OT
much memory the

120

1000
21

Configuring Parallels Virtuozzo Containers 4.7
applications are allowed to
allocate in comparison with
the capacity of the system.
OVERCOMMITMENT_LEVEL_ALLOCMEM_M This allocation memory
60
AX
commitment level is the ratio
of the maximal (among all
running Containers) amount
of allocated memory to the
capacity of the system.
Supplementary parameters define other Parallels Virtuozzo Containers settings:
Parameter

Description

Default value

VZWDOG

Defines whether the vzwdog module is loaded on Parallels
Virtuozzo Containers startup. This module is responsible for
catching messages from the kernel. It is needed if you configure
the serial Monitor Node for Parallels Virtuozzo Containers.

no

VZPRIVRANGE

Defines the ID range for the Containers that are allowed to access 1 100
the  ID stored in the /proc/vz/hwid file.

DUMPDIR

The directory where the Container dump file created by means of
the vzctl suspend command is to be stored.

22

/vz/private/C
T_ID/dump

Configuring Parallels Virtuozzo Containers 4.7

Container Configuration File
Each Container has its own configuration file, which is stored in the /etc/vz/conf directory and
has a name like CT_ID.conf. This file has the same format as the global configuration file. The
settings specified in this file can be subdivided into the following categories: miscellaneous,
networking, backup, resource management parameters, and name-based hosting parameters.
Note: In Parallels Virtuozzo Containers, you can also configure a number of settings for the Node itself by
editing the /etc/vz/conf/0.conf file. Currently, these settings include the VERSION and ONBOOT
parameters, as well as all parameters listed in the table under the System parameters group.

Miscellaneous parameters:
ONBOOT

Specifies whether the Container should be started automatically on system
startup. Parallels Virtuozzo Containers automatically starts all Containers that
have this parameter set to “yes” upon startup.

Note: If "yes" is specified as the value of this parameter in the
0.conf file, all Node system management parameters are set on
the Node boot to the values indicated in this file.
OFFLINE_MANAGEMENT

Overrides the OFFLINE_MANAGEMENT parameter from the global
configuration file.

OFFLINE_SERVICE

Overrides the OFFLINE_SERVICE parameter from the global configuration
file.

ALLOWREBOOT

Specifies whether the Container may be restarted with the “reboot”
command inside. If omitted or set to “yes”, reboot is allowed.

Note: To make reboot working, you should uncomment the
corresponding line in the /etc/cron.d/vereboot file.
CAPABILITY

Specifies capabilities inside of the Container. Setting of following capabilities
is allowed: CHOWN, AC_OVERRIDE, AC_READ_SEARCH, FOWNER, FSETID,
KILL, SETGID, SETUID, SETPCAP, LINUX_IMMUTABLE,
NET_BIND_SERVICE, NET_BROADCAST, NET_ADMIN, NET_RAW,
IPC_LOCK, IPC_OWNER, SYS_MODULE, SYS_RAWIO, SYS_CHROOT,
SYS_PTRACE, SYS_PACCT, SYS_ADMIN, SYS_BOOT, SYS_NICE,
SYS_RESOURCE, SYS_TIME, SYS_TTY_CONFIG, MKNOD, LEASE.

OSTEMPLATE

The name of the OS template that was used for creating the Container. You
do not have to change this parameter; vzctl will set it for you upon calling
the vzctl create command (or using the defaults from the global
configuration file). The . symbol before the OS template name, if specified,
indicates that this is an EZ OS template.

23

Configuring Parallels Virtuozzo Containers 4.7

TEMPLATES

When used in the Container sample configuration file, this parameter defines
a list of application templates that should be automatically added to the
Container being created on the basis of this sample. So, if the corresponding
templates are installed on the Node, and the vzctl create command
uses a configuration file with this parameter defined, the templates will be
added to the Container immediately upon its creation.
When used in the configuration file of an existing Container, this parameter
provides a list of templates that have been installed inside the Container by
means of either the vzctl create, vzpkgadd, or vzpkg install
commands. In this case you should not modify this parameter since it is used
by template management utilities to track the history of the installed
templates. This parameter is omitted if no templates have been applied to the
Container.

VE_ROOT

Overrides the VE_ROOT parameter from the global configuration file.

VE_PRIVATE

Overrides the VE_PRIVATE parameter from the global configuration file.

VE_ENVIRONMENT

Overrides the VE_ENVIRONMENT parameter from the global configuration
file.

TECHNOLOGIES

Determines a set of technologies which should be provided by the Parallels
Virtuozzo Containers kernel for the Container operability. Currently, this
parameter can contain the information about the following technologies:

•

The system architecture of the Container (x86, x86_64, or i64).

•

Whether the Container is based on the OS template supporting
the Native POSIX Thread Library (NPTL). In this case, the nptl
entry is specified as the value of this parameter.

•

Whether the OS EZ template the Container is based on requires
the sysfs filesystem support (e.g. the OS EZ template for SUSE
Linux Enterprise 10).

DISABLED

If set to yes, disables the Container making it impossible to start the
Container once it was stopped. You can start the disabled Container by
setting the value of this parameter to no or using the --force option with
the vzctl set command.

DESCRIPTION

Sets the description for the Container.

Note: You are allowed to use only symbols in the 'A -z' and '0-9'
ranges in your descriptions.
NAME

24

The name assigned to the Container. You can use this name, along with the
Container ID, to refer to the Container while performing this or that Containerrelated operation on the Node. Follow the following rules while setting the
Container name:

•

The name should contain the A-Z, a-z, 0-9, \, -, and _
symbols only.

•

If the name consists of two or more words, it should be quoted
(e.g. "My Container 101").

Configuring Parallels Virtuozzo Containers 4.7

ORIGIN_SAMPLE

The configuration sample the Container was based on when created.

CONFIG_CUSTOMIZED

Indicates whether any of the Container configuration parameters have been
modified as regards its original configuration sample. If this parameter is
omitted, its value is considered as "no".

UUID

The Container unique identifier. This identifier is used by certain Parallels
Virtuozzo Containers utilities during their execution.

VEFORMAT

Displays the VZFS version applied to the Container during its creation:

•

vz4 denotes that the Container is based on VZFS v2.

•

vz3 denotes that the Container is based on VZFS v1.

This parameter is meant for your information only and cannot
be changed.
All resource management parameters can be subdivided into the CPU, disk, system, and VSwap
categories for your convenience. Any parameter can be set with the vzctl set command and
the corresponding option name (in the lower case, e.g. --kmemsize for KMEMSIZE, etc.). See the
Parallels Virtuozzo Containers Command Line Interface chapter for more details. The Typical
value column, if present, specifies a range of reasonable parameter values for different
applications, from light to huge heavy loaded Containers (consuming 1/8 of Node with 2 GB
memory). If barrier and limit fields are in use, ranges for both thresholds are given.
CPU parameters:
Parameter

Description

Typical value

CPUUNITS

250…1000
Guaranteed CPU power. This is a positive integer
number, which determines the minimal guaranteed share
of the CPU the Container receives. The total CPU power
in CPUUNITS is its Bogomips number multiplied by 25.
Parallels Virtuozzo Containers reporting tools consider
one 1 GHz Intel processor to be approximately equivalent
to 50,000 CPU units.

CPULIMIT

Allowed CPU power. This is a positive number indicating
the share of the CPU time, in per cent, the Container may
never exceed. You can estimate this share as (allowed
Container CPUUNITS/CPU power)*100%.

CPUS

The number of CPUs set to handle all the processes
inside the given Container. By default, any Container is
allowed to consume the CPU time of all processors on
the Node.

CPUMASK

The CPU affinity mask defining which CPUs on the Node
can be used to handle the processes running in the
Container. The CPU mask can be specified as both
separate CPU index numbers (1,2,3) and CPU ranges (24,5-7).

25

Configuring Parallels Virtuozzo Containers 4.7

NODEMASK

The NUMA node mask defining a NUMA node to bind the
Container to. Once you set the mask, the processes
running in the Container will be executed only on the
CPUs that belong to the specified NUMA node.

BURST_CPU_AVG_
USAGE

The CPU usage limit, in percent, set for the Container.
This limit is calculated as the ratio of the current
Container CPU usage to the CPU limit (i.e to the value of
the CPULIMIT parameter) set for the Container in its
configuration file. If the limit is not specified, the full CPU
power of the Node is considered as the CPU limit. Upon
exceeding the BURST_CPU_AVG_USAGE limit, the
BURST_CPULIMIT limit is applied to the Container. This
parameter redefines the BURST_CPU_AVG_USAGE
parameter set in the Parallels Virtuozzo Containers
configuration file.

BURST_CPULIMIT

The CPU power limit, in per cent, the Container cannot
exceed. The limitations set in this parameter are applied
to the Container when it exceeds the limit specified in the
BURST_CPU_AVG_USAGE parameter. This parameter
redefines the BURST_CPULIMIT parameter specified in
the Parallels Virtuozzo Containers configuration file.

disabled

Disk parameters:
DISKSPACE

Total size of disk space that can be consumed by the
Container, in 1 Kb blocks.

204800…10485760204800…11534340

DISKINODES

Total number of disk inodes (files, directories, symbolic
links) the Container can allocate.

80000…40000088000…440000

QUOTATIME

The grace period of the disk quota. It is defined in
seconds. The Container is allowed to temporarily exceed
its quota soft limits for not more than the QUOTATIME
period.

0…604800

Specifying -1 as the value of this setting makes the grace
period last 'infinitely'.
QUOTAUGIDLIMIT

This parameter defines the maximum aggregate number 0…500
of user IDs and group IDs for which disk quota inside the
given Container will be accounted. If set to 0, the UID and
GID quota will be disabled.
When managing the quotaugidlimit parameter, keep in
mind the following:

26

•

Enabling per-user and per-group quotas for
a Container requires restarting the
Container.

•

If you delete a registered user but some
files with their ID continue residing inside
your Container, the current number of ugids
(user and group identities) inside the
Container will not decrease.

•

If you copy an archive containing files with
user and group IDs not registered inside
your Container, the number of ugids inside

Configuring Parallels Virtuozzo Containers 4.7
the Container will increase by the number of
these new IDs.
IOPRIO

The Container priority for disk I/O operations. The higher 0-7
the priority, the more time the Container has for writing to
and reading from the disk. The default Container priority
is 4.

IOLIMIT

The bandwidth a Container is allowed to use for its disk
input and output (I/O) operations, in bytes per second.

unlimited

In the current version of Parallels Virtuozzo Containers,
the maximum I/O bandwidth limit you can set for a
Container is 2 GB per second.
IOPS

The maximum number of disk input and output
operations per second a Container is allowed to perform.

unlimited

System parameters:
NUMPROC

Number of processes and threads allowed. Upon hitting 40…400
this limit, Container will not be able to start a new process
or thread.

AVNUMPROC

Number of processes expected to run in the Container
on average. This is informational parameter used by
utilities like vzcfgvalidate in order to ensure
configuration correctness.

NUMTCPSOCK

40…500
Number of TCP sockets (PF_INET family,
SOCK_STREAM type). This parameter limits the number of
TCP connections and, thus, the number of clients the
server application can handle in parallel.

NUMOTHERSOCK

Number of sockets other than TCP. Local (UNIX-domain) 40…500
sockets are used for communications inside the system.
UDP sockets are used for Domain Name Service (DNS)
queries, as example. UDP and other sockets may also be
used in some very special applications (SNMP agents
and others).

VMGUARPAGES

Memory allocation guarantee, in pages. Applications are
guaranteed to be able to allocate memory while the
amount of memory accounted as privvmpages does
not exceed the configured barrier of the vmguarpages
parameter. Above the barrier, memory allocation is not
guaranteed and may fail in case of overall memory
shortage.

KMEMSIZE

Size of unswappable kernel memory, allocated for internal 798720…13148160851968…14024704
kernel structures for the processes of a particular
Container. Typical amounts of kernel memory is 16…50
Kb per process.

TCPSNDBUF

The total size of send buffers for TCP sockets, i.e. the
amount of kernel memory allocated for data sent from
applications to TCP sockets, but not acknowledged by
the remote side yet.

159744…5365760262144…10458760

TCPRCVBUF

Total size of receive buffers for TCP sockets. Amount of
kernel memory, received from remote side but not read
by local application yet.

159744…5365760262144…10458760

0…NUMPROC

1725…107520

27

Configuring Parallels Virtuozzo Containers 4.7

OTHERSOCKBUF

Total size of UNIX-domain socket buffers, UDP and other 61440…1503232163840…4063232
datagram protocols send buffers.

DGRAMRCVBUF

Total size of receive buffers of UDP and other datagram
protocols.

32768…262144

OOMGUARPAGES

Out-of-memory guarantee, in pages. Any Container
process will not be killed even in case of heavy memory
shortage if current memory consumption (including both
physical memory and swap) until the oomguarpages
barrier is not reached.

1725…107520

LOCKEDPAGES

Memory not allowed to be swapped out (locked with the
mlock() system call), in pages (one page is 4 Kb).

4…4096

SHMPAGES

Total size of shared memory (including IPC, shared
anonymous mappings and tmpfs objects), allocated by
processes of a particular Container, in pages.

512…16384

PRIVVMPAGES

Size of private (or potentially private) memory, allocated
by an application. Memory that is always shared among
different applications is not included in this resource
parameter.

3072…1512003450…1612800

NUMFILE

Number of files opened by all Container processes.

512…8192

NUMFLOCK

Number of file locks created by all Container processes.

50…200 – 60…220

NUMPTY

Number of pseudo-terminals. For example, the ssh
session, screen, the xterm application consumes
pseudo-terminal resources.

4…64

NUMSIGINFO

Number of siginfo structures (essentially this
parameter limits the size of signal delivery queue).

256…512

DCACHESIZE

184320…3932160Total size of dentry and inode structures locked in
196608…4194304
memory. As example, application, first opening the
/etc/passwd file, locks entries corresponding to etc
and passwd inodes. If a second application opens the
/etc/shadow file – only entry corresponding to shadow
is charged, because etc is charged already.

NUMIPTENT

The number of IP packet filtering entries.

12…128

VSwap parameters:
PHYSPAGES

Amount of RAM that can be used by the processes of a
Container, in 4-KB pages.

SWAPPAGES

Amount of swap space that can be used by the
Container for swapping out memory once the RAM is
exceeded, in 4-KB pages.

VM_OVERCOMMIT

Memory overcommit factor that defines the
memory allocation limit for a Container. The
limit is calculated as
(PHYSPAGES + SWAPPAGES) * factor.

28

1.5

Configuring Parallels Virtuozzo Containers 4.7

Network-related parameters allow you to set bandwidth management parameters, hostname and
IP addresses that a Container can use as well as to indicate those iptables modules that can be
loaded to the Container:
HOSTNAME

If this parameter is specified, then vzctl will set the hostname to its value upon
the next Container start. This parameter can be omitted. In this case, the Container
administrator should configure the hostname manually.

IP_ADDRESS

The list of IP addresses that can be used on Container network interfaces. This list
is an argument of the Container start call and it is impossible to assign an IP
address from inside the Container if the address is not on the list. Any IP address
assigned from within the Container will be visible only within the Container.

EXT_IP_ADDRESS

The external IP address assigned to the Container. External IP addresses are
considered valid IP addresses by the venet0 adapter, though they are not set as
alias addresses inside Containers and are not announced via Address Resolution
Protocol (ARP).

NAMESERVER

The IP address of the DNS server the Container is supposed to use. More than one
server can be specified in the space-separated format.

SEARCHDOMAIN

DNS search domains for the Container. More than one domain can be specified.

NETDEV

The names of physical network adapters that have been moved from the Node to
the given Container.

IPTABLES

Overrides the IPTABLES parameter from the Parallels Virtuozzo Containers global
configuration file.

NETIF

Specifies a number of parameters for the virtual network adapters existing inside
the Container. These parameters include:

RATE

RATEBOUND

•

ifname: the name of the veth virtual Ethernet interface inside the
Container.

•

mac: the MAC address assigned to the veth virtual Ethernet interface
inside the Container.

•

host_mac: the MAC address assigned to the veth virtual Ethernet
interface on the Node.

•

network: the name of the virtual network where the veth virtual
network adapter is included.

•

ip: the IP address(es) assigned to the veth virtual network adapter.

If traffic shaping is turned on, then this parameter specifies bandwidth guarantee, in
Kb/s, for the Container. The parameters should be set in the form of “eth0:1:8”.
If set to “yes”, the bandwidth guarantee is also the limit for the Container, and the
Container cannot borrow the bandwidth from the TOTALRATE bandwidth pool.

Backup-related parameters, if present, allow you to specify the number of backups to store. If absent, these parameters
are taken from the global backup configuration file or the backup configuration file for a particular Node.

BACKUP_CHAIN_LEN

An incremental backup parameter. After this
number of incremental backups, a full backup
is performed.

7

BACKUP_CHAIN_DAY

An incremental backup parameter. After this

7
29

Configuring Parallels Virtuozzo Containers 4.7
S

number of days a full backup is performed.

BACKUP_KEEP_MAX

The number of backups to store. Only full and 3
plain full backups are accounted. If a regular
backup is being performed that exceeds this
number, the oldest backup is automatically
deleted. This parameter is effective only if the p option is specified with the vzbackup utility.
If there is no -p option, the number of backups
to store is not limited whatever the value of this
parameter.

30

Configuring Parallels Virtuozzo Containers 4.7

Linux Distribution Configuration Files
Some Parallels Virtuozzo Containers utilities (e.g. vzctl) need to run special scripts inside a
Container to perform certain operations on it. However, carrying out one and the same operation
inside Containers running different Linux versions may require execution of different actions. This
may be caused by the fact that different Linux distributions store files in different locations, use
different commands to complete one and the same task, and so on. To distinguish between
Containers running different Linux versions and to determine what scripts should be executed while
performing the relevant Container-related operations, Parallels Virtuozzo Containers uses special
distribution configuration files located in the /etc/vz/conf/dists directory on the Node.
There are a number of distribution configuration files shipped with Parallels Virtuozzo Containers by
default (centos.conf, fedora-core.conf, gentoo.conf, etc.). To view all configuration files
available on your Parallels Virtuozzo Containers, you can go to the /etc/vz/conf/dists
directory and issue the ls command. The distribution configuration files will be displayed in the
form of Linux_Distribution_Name-version.conf where Linux_Distribution_Name
and version denote the name of the Linux distribution and its version, respectively (e.g. fedoracore-7.conf).
Any distribution configuration file consists of a number of entries in the form of
= where  denotes the name of the
parameter defining the operation when the script in the right part of the entry is to be executed and
 is the name of the script to be run on performing the operation defined by the
parameter in the left part of the entry. In the current version of Parallels Virtuozzo Containers, the
following parameters are used to define what scripts should be executed for the corresponding
Linux version a Container is running:
•

ADD_IP: the script specified as the value of this parameter has the default name of
-add_ip.sh and is used to configure the network settings during
the Container startup and the IP address(es) assignment. The script is launched inside the
Container on executing the following commands:

vzctl start CT_ID
vzctl set CT_ID --ipadd 
vzctl set CT_ID --ipadd  --ipdel all

•

DEL_IP: the script specified as the value of this parameter has the default name of
-del_ip.sh and is used to delete an existing IP address from the
Container. The script is launched inside the Container on executing the following commands:

vzctl set CT_ID --ipdel 
vzctl set CT_ID --ipdel all

•

SET_HOSTNAME: the script specified as the value of this parameter has the default name of
-set_hostname.sh and is used to configure the hostname of the
Container. The script is launched inside the Container on executing the following command:

vzctl set CT_ID --hostname 

31

Configuring Parallels Virtuozzo Containers 4.7

•

SET_DNS: the script specified as the value of this parameter has the default name of
-set_dns.sh and is used to configure DNS parameters in the
/etc/resolv.conf file. The script is launched inside the Container on executing the following
command:

vzctl set CT_ID --searchdomain  --nameserver 

•

SET_USERPASS: the script specified as the value of this parameter has the default name of
-set_userpass.sh and is used to add a new user or change the
current password. The script is launched inside the Container on executing the following
command:

vzctl set CT_ID --userpasswd 

•

SET_UGID_QUOTA: the script specified as the value of this parameter has the default name of
-set_ugid_quota.sh and is used to set up second level quota.
The script is launched inside the Container on executing the following command:

vzctl set CT_ID --quotaugidlimit 

•

POST_CREATE: the script specified as the value of this parameter has the default name of
-postcreate.sh and is used to perform certain tasks (e.g. to
modify the crontab files) after the Container creation. This script is launched on the Node on
executing the following command:

vzctl create CT_ID

•

POST_MIGRATE: the script specified as the value of this parameter has the default name of
-post_migrate.sh and is used to perform certain operations on
the Container where the physical server has been successfully migrated. This script is launched
inside the Container on executing the following command:

vzp2v [options] --ctid CT_ID

The scripts specified in distribution configuration files are located in the
/etc/vz/conf/dists/scripts directory on the Node and executed on performing the
aforementioned operations on the Containers. After an operation has been initiated, the vzctl or
vzp2v utility turns to the corresponding Container configuration file, looks for the value of the
DISTRIBUTION variable or, if the latter is not present, of the OSTEMPLATE variable in this file, and
defines on their basis what Linux version the given Container is running. After that, vzctl reads
the corresponding configuration file for the determined Linux version from the
/etc/vz/conf/dists directory and executes the scripts specified in this file.
Note: If no distribution is specified as the value of the DISTRIBUTION and OSTEMPLATE variables in the
Container configuration file or no configuration file for the given Linux version was found in the
/etc/vz/conf/dists directory, the default file from this directory is used.

32

Configuring Parallels Virtuozzo Containers 4.7

Network Classes Definition File
In Parallels Virtuozzo Containers, both traffic accounting and bandwidth management are based on
network classes. The network classes’ definition file (/etc/vz/conf/networks_classes)
describes network classes that Parallels Virtuozzo Containers recognizes. Currently, there can be
up to 15 classes defined.
The lines in this file have the following format:
 /

where  defines the network class identifier,  defines the starting IP
address, and  defines the subnet mask. In pair  and
 define the range of IP addresses for this class. There may be several lines for
each class. Classes should be defined after Class 1 and represent exceptions from the “matchingeverything” rule of Class 1. Class 0 has a special meaning and defines the IP ranges for which no
accounting is done (this Node Container addresses).
The definition of class 1 is required; any class except class 1 can be omitted. However, it is
recommended to define class 0 correctly - it will improve performance. For example:
# HW node VPS's networks
0 10.10.10.0/24
0 10.10.15.0/24
# all IP("local" traffic)
1 0.0.0.0/0
# class 2 - "foreign" traffic
#2 10.0.0.0/8
#2 11.0.0.0/8
# inside "foreign" network there
# is a hole with "local" traffic
#1 10.10.16.0/24

33

Configuring Parallels Virtuozzo Containers 4.7

vzup2date Configuration File
The /etc/sysconfig/vzup2date/vzup2date.conf file is used by the vzup2date utility on
the step of connecting to the repository with storing the latest Parallels Virtuozzo Containers
updates.
The parameters in this file are presented on separate lines in the following format:
=

The table below describes these parameters:
Parameter

Description

Example

Server

The URL used for the connection.

https://vzup2date.
parallels.com

User

The user name for accessing the update server.

user1

Password

The password for accessing the update server.

sample

HTTP_PROXY

The proxy server address, if you use this server.

http://192.168.1.20

HTTP_PROXY_U The user name used by the HTTP proxy server for
SER
your authentication.

peter

HTTP_PROXY_P The password of the user specified in the
ASSWORD
HTPP_PROXY_USER parameter and used for your
authentication by the HTTP proxy server.

2wed45r

LocalReposit The path to the local directory on the Node where the /vz/vzup2date
oryDir
downloaded Parallels Virtuozzo Containers updates
are stored. By default, the /vz/vzup2date directory
is used.
LogFile

/var/log/vzup2date.log
The path to the log file on the Node containing the
information on Parallels Virtuozzo Containers updates.
By default, the /var/log/vzup2date.log file is
used.

Not all the possible parameters must be necessarily present in this file. In fact, all the parameters
are optional, i.e. if they are missing from this file, the vzup2date utility will ask for the user input
without suggesting its own variant taken from this file.

34

Configuring Parallels Virtuozzo Containers 4.7

vzup2date-mirror Configuration File
The vzup2date-mirror configuration file is used by the vzup2date-mirror utility for
determining the connection parameters of the repository with Parallels Virtuozzo Containers system
and templates updates and deciding what updates to download to the local mirror. The parameters
in this file are presented on separate lines in the following format:
=

The options that can be specified in the vzup2date.conf file are described in the table below:
Parameter

Description

Example

Server

The URL used for the connection.

https://vzup2date.
parallels.com

As a rule, this parameter is set automatically and
does not need to be modified.
User

The user name for accessing the update server. user1
As a rule, this parameter is set automatically and
does not need to be modified.

Password

The password for accessing the update server.

sample

As a rule, this parameter is set automatically and
does not need to be modified.
HTTP_PROXY

The proxy server address, if you use this server. http://192.168.1.20

HTTP_PROXY_USER

The user name used by the HTTP proxy server
for your authentication.

peter

HTTP_PROXY_PASSWO The password of the user specified in the
RD
HTTP_PROXY_USER parameter and used for
your authentication by the HTTP proxy server.

2wed45r

LocalRepositoryRo The local directory where the mirror is to be
ot
located and all the required packages are to be
stored after the execution of vzup2datemirror. This parameter can be overwritten by
the local_repo_path parameter of the
vzup2date-mirror utility (to learn more
about local_repo_path, see the
vzup2date-mirror subsection).

/var/www/html

35

Configuring Parallels Virtuozzo Containers 4.7

Releases

The list of comma-separated Parallels
Virtuozzo Containers releases or OS
templates names. The format of this
parameter is different for different types
of updates:
•

For system updates, you should set
it in the arch/Parallels
Virtuozzo
Containers_release format.

•

For EZ templates updates, you
should set it in the
arch/EZ_template_name
format.

i386/5

By default, the value of this parameter is set to
all/all meaning that all available updates for
all system architectures will be downloaded
from the Parallels Virtuozzo Containers official
repository to your local mirror.
MirrorName

The name assigned to the mirror. You must
specify this parameter for each mirror if you are
planning to have several mirrors with different
LocalRepositoryRoot parameters
operating simultaneously on your server (in one
Container). These mirror names will be used by
the apache application to distinguish among
the existing mirrors.

HTTPD_CONFIG_
FILE

/etc/httpd/conf/
The path to the httpd configuration file. This
httpd.conf
file is required for the correct work of the
apache application. As you can create an
HTTP-based mirror only, the apache
application should be installed on the server and
a valid path to httpd.conf should be
specified. By default, this parameter is set to
/etc/httpd/conf/httpd.conf. If you have
not change the default httpd.conf file
location, you do not need to change this
parameter.

Mirror1

The vzup2date-mirror configuration file can also include a section defining the updates
approval policy for deploying Parallels Virtuozzo Containers system updates to the Nodes in your
local network. This section must be opened with the  tag (where arch denotes the system architecture (e.g. x86_64) and release
denotes the Parallels Virtuozzo Containers release (e.g. 5) the specified policy will be applied to)
and closed with the  tag. This section is optional. If it is absent from
the configuration file, all updates downloaded to your local mirror are automatically approved for
installation on your Nodes. The parameters that can be specified in this section are described in the
table below:
36

Configuring Parallels Virtuozzo Containers 4.7
Parameter

Description

CU

The maximum version of Parallels Virtuozzo Containers kernel updates for the specified
architecture/release pair. All Parallels Virtuozzo Containers kernel updates having
higher versions and downloaded to your local mirror will be invisible for the
vzup2date utility that you will run on the Nodes in your local network.

TU

The maximum version of Parallels Virtuozzo Containers tools and utilities updates for
the specified architecture/release pair. All tools and utilities updates having higher
versions and downloaded to your mirror will be invisible for the vzup2date utility that
you will run on the Nodes in your local network.

MU

Enables (yes) or disables (no) the vzup2date utility to download the next major
version update of the Parallels Virtuozzo Containers software.If this parameter or the
whole updates approval mechanism section is omitted, major updates are available to
the vzup2date utility by default.

37

Configuring Parallels Virtuozzo Containers 4.7

vzvpn Configuration File
The /etc/vzvpn/vzvpn.conf file is used by the Parallels Support Tool to establish a secure
connection (a virtual private network) between your Node and the Parallels support server.
The parameters in this file are presented on separate lines in the following format:
=

The table below describes these parameters:
Parameter

Description

REMOTE_HOST

Mandatory. The hostname or the IP address of the Parallels support
server.

REMOTE_PORT

Mandatory. The port number of the Parallels support server to be used for
establishing a virtual private network (VPN).

STARTTMO

Mandatory. The time, in seconds, during which there will be attempts to
start the Parallels Support Tool if it could not be started immediately after
its launching.

INACTIVE

Mandatory. The time of inactivity, in seconds, after which the connection
between your Node and the Parallels support server will be closed.

PING

Mandatory. The time, in seconds, at the end of which the port of the
Parallels support server will be pinged in case no packets have been
received from the support server during the time specified.

PING_EXIT

Mandatory. The time, in seconds, after a lapse of which the connection
between your Node and the Parallels support server will be closed in case
no ping signals or other packets have been received from the support
server during this time.

HTTP_PROXY=hostname[: Optional. The hostname or the IP address and the port number of the
port]
HTTP proxy server through which a VPN between your Node and the
Parallels support server is to be established. This parameter overrides the
HTTP_PROXY parameter set in the /etc/vz/vz.conf file on the Node.
If the HTTP_PROXY parameter is not specified in either of the files, the
Parallels Support Tool looks for the http_proxy environment variable on
the Node and takes its value for establishing a VPN.
HTTP_PROXY_USER

Optional. The user name used by the HTTP proxy server for your
authentication.

HTTP_PROXY_PASSWORD

Optional. The password of the user specified in the HTTP_PROXY_USER
parameter and used for your authentication by the HTTP proxy server.

Note: You are not recommended to change any of the aforementioned parameters. Modify them only if
you are dead certain of your actions (for example, you have received the corresponding information from
Parallels).

38

Configuring Parallels Virtuozzo Containers 4.7

vzreport Configuration File
The /etc/vzreport.conf file is used by the vzreport utility to submit a problem report to the
Parallels support team.
The parameters in this file are presented on separate lines in the following format:
=

The table below describes these parameters:
Parameter

Description

SUBMIT_URI

The Uniform Resource Identifier (URI) of the Parallels support server to be
used to receive and gather your problem reports.

COLLECTOR_SCRIPT

The path to the file on your Node where the information on your problems
reports is collected. This is the same data that is sent to the Parallels
support server.

HTTP_PROXY

The hostname or the IP address of the HTTP proxy server through which
your problem report will be sent to the Parallels support team.

HTTP_PROXY_USER

The user name used by the HTTP proxy server for your authentication.

HTTP_PROXY_PASSWORD

The password of the user specified in the HTTP_PROXY_USER parameter
and used for your authentication by the HTTP proxy server.

Not all the possible parameters should be necessarily present in this file. In fact, all the parameters
are optional except for the SUBMIT_URI parameter which should be specified to tell the
vzreport utility where to send your problem report.

39

Configuring Parallels Virtuozzo Containers 4.7

Kernel Parameters
There is a number of kernel limits that should be set for the Parallels Virtuozzo Containers software
to work correctly. Parallels Virtuozzo Containers is shipped with a tuned /etc/sysctl.conf file.
Understanding what parameters were changed is essential for running the required number of
Containers. Below is the contents of the /etc/sysctl.conf file as shipped with Parallels
Virtuozzo Containers:
# On the Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Enables the magic-sysrq key
kernel.sysrq = 1
# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0
# ARP thresholds. First one is num_ve x 3 + 512
# second one is 2 times first one
net.ipv4.neigh.default.gc_thresh2 = 2048
net.ipv4.neigh.default.gc_thresh3 = 4096
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

Notice that some parameters of the kernel configuration depends on the maximum number of
Containers you plan to run. In the default configuration file, these numbers were calculated under
the assumption the maximum Container number is 512. If you plan to run another number of
Containers, it is recommended to recalculate net.ipv4.neigh.default.gc_thresh2 and
net.ipv4.neigh.default.gc_thresh3 parameters as three per Container plus 128…512.
Keep the second parameter twice as great as the first one.
To apply the changes issue the following command:
# sysctl -p

Besides, it makes sense to set net.ipv4.tcp_use_sg to 0, since corresponding
“Scatter/gather IO” feature is not supported by the venet device, used in Parallels Virtuozzo
Containers networking.
It is also worth mentioning that normally you should have forwarding turned on since the Node
forwards packets destined to or originated from Containers.

40

Configuring Parallels Virtuozzo Containers 4.7

Offline Management Configuration Files
The offline management configuration files located in the /etc/vzredirect.d directory define
various modes of Container offline management by Container administrators. One configuration file
describes one offline management mode. In the current Parallels Virtuozzo Containers version, two
files are accessible: vzpp.conf and vzpp-plesk.conf. The first file defines the Container
offline management by means of Parallels Power Panel, and the second one - by means of the
same Power Panel with an integrated Plesk control panel.
There are two parameters in each of the files. They are presented on separate lines in the following
format:
=

The table below describes these parameters:
Parameter

Description

Example

PORT

This port must be entered in the address line of an
Internet browser after the Container IP address when
managing the Container by means of Parallels Power
Panel or the Plesk control panel.

PORT=8443

DST_VEID

The ID of the Container where the requests coming to
the specified port will be redirected.

DST_VEID=1

41

Configuring Parallels Virtuozzo Containers 4.7

vzlmond Configuration File
The /etc/vzlmond.conf file defines the configuration parameters for the vzlmond daemon
used to periodically check and log the state of your Node. The gathered logs can then used by the
vzstatrep utility to generate statistic reports and graphics on their basis and to send these
reports and graphics to the Node administrator's e-mail address(es). Detailed information on the
vzstatrep utility is provided in the vzstatrep subsection (p. 164).
The parameters in this file are presented on separate lines in the following format:
=

The table below describes these parameters:
Name

Description

STATS_VMSTAT_PERIOD

480
The periodicity, in seconds, with which the
vmstat utility is run on the Node and its
output is saved to log files in the directory
specified as the value of the LOGS_DIR
parameter. The vmstat output contains
information on the Node kernel threads,
virtual memory, disks, traps, and CPU activity.
For more information on vmstat, see its man
pages.

STATS_FULLDUMP_PERIOD

The period, in seconds, at the end of which
480
the complete statistics on the Node resources
consumption is gathered and logged to the
directory specified as the value of the
LOGS_DIR parameter. As distinct from the
vmstat output, this statistics represents a
snapshot of the files contents from the /proc
directory on the Node and contains
information on virtually every Node resource:
the environment of a certain process, the
state and configuration of the CPU(s), the
number of I/O ports on the Node and their
configuration, etc. Keep in mind that the
amount of disk space needed to store this
information may be considerable (about 0,5
Kb per Container). However, you are
recommended to set the period to no more
than 10 minutes to regularly check and log
the current Node state and resources
consumption.

STATS_NET_PERIOD

The period, in seconds, after which the Node
network statistics is collected and logged to
the directory specified as the value of the
LOGS_DIR parameter. The network statistics
is gathered separately for each network
interface on the Node (e.g. eth0, eth1).

LOGS_DIR

The name of the directory on the Node where /var/log/vzstat
the gathered statistics is to be stored.

42

Default Value

480

Configuring Parallels Virtuozzo Containers 4.7

All the aforementioned parameters are set to their default values during the Parallels Virtuozzo
Containers installation; so, you do not have to additionally edit any parameter in the
/etc/vzlmond.conf file to start gathering your Node statistics.

43

Configuring Parallels Virtuozzo Containers 4.7

vzstat Configuration File
This file (/etc/vzstat.conf) lists a number of CPU-, memory-, and disk-related parameters
used by the vzstat utility. The values assigned to these parameters denote either the warning or
the error level for the vzstat utility to start displaying these parameters either in the yellow color
(the warning level has been hit) or in the red color (the error level has been hit). Moreover, if a
parameter has hit the error level, the CRIT warning is displayed instead of OK after the name of the
corresponding subsystem (CPU, Memory, Swap, Net, or Disks).
The table below provides information on the name and the description of all these parameters, on
whether they denote the warning or the error level, whether the real parameter value has to be
higher or lower than this level in order to invoke an alert, and on the parameters default values:
Parameter

Description

Default
Value

Alert
When

Alert Type

LOAD_AVG

Load average.

30

Higher

Warning

PROC_RUN

Number of running processes.

20

Higher

Warning

PROC_UNINT

Number of uninterruptable
processes (in “D” state).

20

Higher

Warning

CPU_IDLE

CPU idle time, in percent.

10

Lower

Warning

CPU_SYS

CPU system time, in percent.

50

Higher

Warning

CPU_LAT_MAX_WARN

Scheduling latency, in milliseconds 750
(maximum over 5 sec period).

Higher

Warning

CPU_LAT_MAX_ERR

Scheduling latency, in milliseconds 1000
(maximum over 5 sec period).

Higher

Error

CPU_LAT_AVG_WARN

Scheduling latency, in milliseconds 500
(5 sec average).

Higher

Warning

CPU_LAT_AVG_ERR

Scheduling latency, in milliseconds 750
(5 sec average).

Higher

Error

MEM_LAT_MAX_WARN

Memory allocation latency, in
300
milliseconds (maximum over 5 sec
period).

Higher

Warning

MEM_LAT_MAX_ERR

Memory allocation latency, in
milliseconds (maximum over 5 sec
period).

500

Higher

Error

MEM_LAT_AVG_WARN

Memory allocation latency, in
milliseconds (5 sec average).

250

Higher

Warning

MEM_LAT_AVG_ERR

Memory allocation latency, in
milliseconds (5 sec average).

400

Higher

Error

MEM_ZONE_ACT_INACT_FREE_WARN

Size of available memory (free +
active + inactive pages), in
percent.

8

Lower

Warning

MEM_ZONE_ACT_INACT_FREE_ERR

Size of available memory (free +
active + inactive pages), in
percent.

4

Lower

Error

44

Configuring Parallels Virtuozzo Containers 4.7

MEM_ZONE_ACT_INACT_FREE_ABS_WARN

Size of available memory (free +
active + inactive pages), in MB.

4

Lower

Warning

MEM_ZONE_ACT_INACT_FREE_ABS_ERR

Size of available memory (free +
active + inactive pages), in MB.

2

Lower

Error

MEM_ZONE_ORDER_GT_0

Number of pages which are
gathered in blocks with order > 0.
For example, if current memory
distribution looks like: 3*1 1*2 3*4
5*8 .... Then number of pages
with order>0 is 1*2 + 3*4 + 5*8 +
...

100

Lower

Warning

SWAP_FREE_WARN

Free swap space, in percent.

75

Lower

Warning

SWAP_FREE_ERR

Free swap space, in percent.

50

Lower

Error

SWAP_IN_WARN

Swap-in activity, in Mb/sec.

0.5

Higher

Warning

SWAP_IN_ERR

Swap-in activity, in Mb/sec.

1

Higher

Error

SWAP_OUT_WARN

Swap-out activity, in Mb/sec.

0.5

Higher

Warning

SWAP_OUT_ERR

Swap-out activity, in Mb/sec.

1

Higher

Error

SWAP_LAT_MAX_WARN

Swap-in latency, in milliseconds
(maximum over 5 sec period).

750

Higher

Warning

SWAP_LAT_MAX_ERR

Swap-in latency, in milliseconds
(maximum over 5 sec period).

1000

Higher

Error

SWAP_LAT_AVG_WARN

Swap-in latency, in milliseconds (5
sec average).

500

Higher

Warning

SWAP_LAT_AVG_ERR

Swap-in latency, in milliseconds (5
sec average).

750

Higher

Error

DISK_FREE_INODES_WARN

Free inodes on the disk, in
percent.

20

Lower

Warning

DISK_FREE_INODES_ERR

Free inodes on the disk, in
percent.

5

Lower

Error

DISK_FREE_SPACE_WARN

Free disk space, in percent.

20

Lower

Warning

DISK_FREE_SPACE_ERR

Free disk space, in percent.

5

Lower

Error

CT_FAILCNT_DELTA

Number of failed UBC resource
1
allocations for a particular
Container between vzstat
screen updates (any resource type
counts).

Higher

Error

45

Configuring Parallels Virtuozzo Containers 4.7

vzrmond Configuration File
This file (/etc/vzrmond.conf) is the configuration file for the vzrmond daemon which is running
on the Monitor Node and provides the remote monitoring of Nodes registered in it and the sending
of alerts to the specified e-mail addresses. It also allows you to use external applications for
sending alerts (e.g. via ICQ or SMS). The file lists a number of parameters some of which have
values that should be provided by the user (from HOSTS through CUSTOM_LIST). These values are
included in double quotes and separated by spaces from each other. The remaining parameters
have default values that may be altered by the user. They are not included in quotes.
Parameter

Description

Default value

HOSTS

The list of hosts to be monitored
delimited by spaces. Both hostnames
and IP addresses are allowed.

“”

EMAIL_ADDRESSES

E-mail addresses to receive the alerts.
Must be separated by spaces.

“”

EMAIL_NOTIFICATIONS

The types of notifications to be sent to
the specified e-mail address(es).

SYSTEM_UP SYSTEM_DOWN
DISK_OK
DISK_BAD
INODES_NORM
INODES_HIGH
HDDBUSY_NORM
HDDBUSY_HIGH
SSH_UP
SSH_DOWN
VZSTAT_OK
VZSTAT_BAD
LOADAVG_NORM
LOADAVG_HIGH
UNINT_NORM UNINT_HIGH
MEMLATM_NORM
MEMLATM_HIGH
MEMLATA_NORM
MEMLATA_HIGH
CPULATM_NORM
CPULATM_HIGH
CPULATA_NORM
CPULATA_HIGH
SWAPIN_NORM
SWAPIN_HIGH
SWAPOUT_NORM
SWAPOUT_HIGH

CUSTOM_ACTION

46

The program to send alerts of a
customized type (e.g. via ICQ or SMS).

“”

Configuring Parallels Virtuozzo Containers 4.7

CUSTOM_LIST

Options passed as the command-line
parameters of the program specified by
CUSTOM_ACTION. Must be separated
by spaces.

POLL_PERIOD

Periodicity of checking up the registered 15
Nodes, in seconds.

CHK_MAX_FAILS

After this number of unsuccessful
attempts to reach a Node, the “Node is
dead” alert is sent.

4

LOAD_AVG

The average number of processes on
the Node. When this value is exceeded,
an alert is sent.

30

PROC_UNINT

The number of uninterruptable sleeping
processes (in the “D” state). When this
value is exceeded, an alert is sent.

20

CPU_LAT_MAX_ERR

1000
The maximal process scheduling
latency, in milliseconds. When this value
is exceeded, an alert is sent.

CPU_LAT_AVG_ERR

750
The average process scheduling
latency, in milliseconds. When this value
is exceeded, an alert is sent.

MEM_LAT_MAX_ERR

The maximal memory allocation latency, 500
in milliseconds. When this value is
exceeded, an alert is sent.

MEM_LAT_AVG_ERR

The average memory allocation latency,
in milliseconds. When this value is
exceeded, an alert is sent.

400

SWAP_IN_ERR

The swap in activity, in Mb/s. When this
value is exceeded, an alert is sent.

1.0

SWAP_OUT_ERR

The swap out activity, in Mb/s. When
this value is exceeded, an alert is sent.

1.0

DISK_FREE_INODES_ERR

The percentage of free disk inodes.
When the actual value becomes less
than this value, an alert is sent.

5

DISK_FREE_SPACE_ERR

The percentage of free disk space.
When the actual value becomes less
than this value, an alert is sent.

5

“”

To be able to begin monitoring a Node, you should provide the valid values for the HOSTS and
EMAIL parameters. If you wish to use an external program for sending alerts about the Node state,
you should install in on the Monitor Node and provide its name and options in the
CUSTOM_ACTION and CUSTOM_LIST parameters. The alert message text will be sent as the
standard input for the specified program.
You should increase the value of the POLL_PERIOD parameter together with the increase in the
number of monitored Nodes not to create an overload on the Monitor Node. The parameters
related to the scheduling latency, memory allocation latency, and swap in/out activity serve to have
an alert generated if the system’s performance plummets due to the abnormal values of these
parameters.
47

Configuring Parallels Virtuozzo Containers 4.7

Do not forget to restart the vzrmond daemon after you have edited this configuration file.

48

Configuring Parallels Virtuozzo Containers 4.7

vzstatrep Configuration File
The vzstatrep.conf configuration file located in the /etc directory on the Monitor Node is
used by the vzstatrep utility while trying to generate statistic reports and graphics on the Node
resource consumption and to send them to your e-mail address. This file has a number of lines in
the following format:
="parameter_value"

Below is a list of available parameters:
Name

Description

NODES

The IP address or hostname of the Node whose logs are to be analyzed. You
can set several Nodes for being processed with the help of the vzstatrep
utility and separate them by spaces. If no Node is specified, the logs of the local
server (i.e. of the Monitor Node itself) are analyzed.

STATS_EMAIL

The e-mail address to send the generated statistic reports and graphics to. You
can specify several e-mail addresses and separate them by commas or spaces.

GNUPLOT

The path to the gnuplot utility on the Monitor Node. By default, the utility is
located in the /usr/bin directory; however, you may specify another directory
for its location (e.g. /etc/mydir/gnuplot). gnuplot is used by the
vzstatrep utility to present the Node resources consumption in the graphical
form. The resources whose graphics are to be generated should be set as the
values of the STATS_PLOT parameter. For detailed information on the gnuplot
utility, see its man pages.

MUTT

The path to the mutt utility on the Monitor Node. By default, the utility is located
in the /usr/bin directory; however, you may specify another directory for its
location (e.g. /etc/mydir/mutt). mutt is used by the vzstatrep utility to
send the generated statistic reports and graphics in the form of attached files via
e-mail. For detailed information on the mutt utility, see its man pages.

LOGS_DIR

The path to the directory on the Node where vzstatrep will search for the logs
generated by the vzlmond daemon and containing the information on the Node
resources consumption. By default, the /var/log/vzstat directory is used. If
you have changed the directory where vzlmond stores the gathered
information, you should specify the full path to this directory as the value of this
parameter (e.g. LOGS_DIR=/my_logs/vzstat).

STATS_PLOT

Specify the resources parameters whose graphics are to be generated by means
of the gnuplot utility. You can specify several resources and separate them by
spaces. Currently, you can create graphics for the following parameters:

•

ve_sum: the information on the CPU usage for all Containers on the
Node.

•

ve_top: the information on the CPU usage for 5 Containers with
the highest CPU consumption.

•

loadavg: the average number of active processes for the past 1, 5,
and 15 minutes. Active processes can be running, i.e. currently
executed by the CPU, or runnable, i.e. waiting in the run queue for
the CPU.

•

io: the amount of data read from and written to all devices on the

49

Configuring Parallels Virtuozzo Containers 4.7
Node, in kilobytes per second.
•

mem: the total memory consumption on the Node.

•

ints: the number of interrupts and context switches on the Node
per second.

•

cpu: the information on the CPU load on the Node.

•

net: the network information for each network interface on the
Node.

•

forks: the number of copies of all processes made on the Node
during one second.

By default, all the aforementioned resources except for ve_sum are plotted.

To start analyzing the logs, creating the Node statistic reports and graphics, and receiving e-mail
messages with these reports and graphics, you should specify the NODES and STATS_EMAIL
parameters in the /etc/vzstatrep.conf file. All the other parameters are automatically set
during the vzrmon package installation on the Monitor Node.

50

Configuring Parallels Virtuozzo Containers 4.7

Backup Configuration File
This file (/etc/vzbackup.conf) is in the same format as the global Parallels Virtuozzo
Containers configuration file and per-Container configuration files. All the parameters define the
global backup settings, but some of them may be overridden by the per-Node configuration file, if
the latter exists. Still, other parameters may be further overridden in the configuration file of a
particular Container.
All-Node parameters:
Parameter

Description

Default value

BACKUP_DIR

The backup directory, i.e. the directory where
backups are stored.

/vz/backup

BACKUP_TYPE

The backup type. Among the supported types are i
"plain full (F)", "full (I)", and "incremental (i)". The
default is incremental. If it is impossible to do an
"incremental" backup, a "full" backup will be made.

BACKUP_NODES

The hostname of the Node whose Containers are
to be backed up. You can specify several
hostnames of your Nodes and separate them by
spaces. If you wish to back up Containers residing
on the Backup Node itself, you should specify its
hostname as the value of this parameter.

BACKUP_MAX_CHLD

The maximal number of Nodes to back up in
parallel for non-periodic backups.

1

BACKUP_MAX_CHLD_CRON

The maximal number of Nodes to back up in
parallel for periodic backups.

3

BACKUP_NOTIFY_EMAIL

The e-mail addresses where to send notifications
about the backing up.

BACKUP_COMPRESS

none
Specifies whether the Containers are to be
compressed when being backed up, and with what
compression algorithm. When backing up
Containers residing on Parallels Virtuozzo
Containers 4.7 Hardware Nodes, you can set this
option to one of the following values:

•

C0: in this case the Container backup is
created without any compression. Using
this level of compression, you may greatly
reduce the backup creation time;
however, the size of the resulting backup
file may significantly increase as compared
to other compression levels.

•

C1: in this case the Container backup is
created with a normal level of
compression.

•

C2: in this case the Container backup is
created with the high level of
compression. The size of the resulting

51

Configuring Parallels Virtuozzo Containers 4.7
backup file is smaller than that of the
backup file compressed in the 'normal'
and 'none' modes; however, it takes
longer to create the backup file.
•

CRON_BACKUP

C3: in this case the Container backup is
created with the maximal level of
compression. The size of the resulting
backup file is the smallest and the time of
the backup creation - the longest.

Specifies whether the backing up is performed as a no
cron job. If set to "yes", the values of the
BACKUP_KEEP_MAX and BACKUP_LOADAVG_MAX
parameters in the given file are taken into
consideration. This parameter can be overridden by
the -p or -j command line switch of the
vzbackup utility.

Per-Node parameters:
Parameter

Description

Default value

BACKUP_SSH_OPTS

Options which are passed to ssh when it is used.

-c blowfish

On Parallels Virtuozzo Containers 4.7 Hardware
Nodes, this option is relevant only for the vzbackup
and vzrestore utilities when they are run in the
compatibility mode.
BACKUP_VESTOP

Defines whether the Containers are to be stopped
before their backing up. If set to –s, the Containers are
stopped by default, otherwise, they are not stopped.
On Parallels Virtuozzo Containers 4.7 Hardware
Nodes, this option is relevant only for the vzbackup
and vzrestore utilities when they are run in the
compatibility mode.

BACKUP_EXCL_VES

Defines those Containers that are to be excluded from
the backup list. Container IDs must be given here.

BACKUP_LOADAVG_MAX

The maximal loadavg with which backing up is
allowed. This parameter is effective only if the -p
option is specified with the vzbackup utility.

10

On Parallels Virtuozzo Containers 4.7 Hardware
Nodes, this option is relevant only for the vzbackup
and vzrestore utilities when they are run in the
compatibility mode.
BACKUP_FINISH_TIME

The time when the backing up should be stopped and
delayed until the next execution, e.g. when running
backup scripts at 4am, one can require the backup to
be finished before 7am. The backup will continue from
the last Container at the next execution. The format is:
"HH:MM". This parameter is effective only if the -L
option is specified with the vzbackup utility.

none

BACKUP_LIMIT_TIME

The number of hours after which the backing up
should be stopped and delayed until the next

none

52

Configuring Parallels Virtuozzo Containers 4.7
execution. The format is: "HH". This parameter is
effective only if the -L option is specified with the
vzbackup utility.

Per-Container parameters
Parameter

Description

Default Value

BACKUP_CHAIN_LEN

An incremental backup parameter. After this
number of incremental backups, a full
backup is performed.

7

On Parallels Virtuozzo Containers 4.7
Hardware Nodes, this option is relevant only
for the vzbackup and vzrestore utilities
when they are run in the compatibility mode.
BACKUP_CHAIN_DAYS

An incremental backup parameter. After this
number of days a full backup is performed.

7

On Parallels Virtuozzo Containers 4.7
Hardware Nodes, this option is relevant only
for the vzbackup and vzrestore utilities
when they are run in the compatibility mode.
BACKUP_KEEP_MAX

3
The number of backups to store. Only full
and plain full backups are accounted. If a
regular backup is being performed that
exceeds this number, the oldest backup is
automatically deleted. This parameter is
effective only if the -p option is specified with
the vzbackup utility. If there is no -p option,
the number of backups to store is not limited
whatever the value of this parameter.
On Parallels Virtuozzo Containers 4.7
Hardware Nodes, this option is relevant only
for the vzbackup and vzrestore utilities
when they are run in the compatibility mode.

If you want to rewrite the per-Node parameters for a particular Hardware Node, you should create
a new configuration file named .conf and put it to the backup directory (defined by the
BACKUP_DIR parameter in the global backup configuration file.

53

Configuring Parallels Virtuozzo Containers 4.7

vzrhnproxy Configuration File
This file (/etc/vz/pkgproxy/rhn.conf) is the configuration file for vzrhnproxy - a special
utility which can be used on any RHEL-based server (e.g. RHEL 4 or 5, Fedora Core 5 or , CentOS
4 or 5) to create RHN (Red Hat Network) Proxy Servers allowing you to effectively manage the RPM
packages included in the RHEL 4 and 5 OS EZ templates.
The parameters in this file are presented on separate lines in the following format:
=
The table below describes these parameters:
Parameter Name

Description

REDHAT_LOGIN

The user name for logging in to Red Hat Network.

REDHAT_PASSWORD

The password of the user specified as the value of the REDHAT_LOGIN
parameter.

HTTP_PROXY

The hostname or the IP address and the port number of the HTTP proxy
server, if you use any to connect to the Internet.

HTTP_PROXY_USER

The user name used by the HTTP proxy server for your authentication.

HTTP_PROXY_PASSWORD

The password of the user specified in the HTTP_PROXY_USER
parameter and used for your authentication by the HTTP proxy server.

EMAIL

The destination of all tracebacks.

PRE_DOWNLOAD

The names of the packages to be downloaded when running the
vzrhnproxy update command. The names of the packages listed as
the value of this parameter should correspond to the names of real
packages in the RHEL repository in Red Hat Network and can be
specified as regular expressions (e.g. perl.*).

54

Configuring Parallels Virtuozzo Containers 4.7

vzpkgproxy Configuration File
This file (/etc/vzpkgproxy/vzpkgproxy.conf) is the configuration file for vzpkgproxy - a
special utility which can be used to create special caching proxy servers allowing you to efficiently
manage your OS and application EZ templates.
The parameters in this file are presented on separate lines in the following format:
=
The table below describes these parameters:
Parameter Name

Description

REPO_DIR

The path to the directory on the proxy server where the local repository created
on the basis of the cached packages is to be stored.
By default, this directory has the path of /var/www/html/download.

CACHE_DISABLE

The IP addresses of the hosts to be excluded from the caching process. It
means that the packages requested by Nodes and received from these hosts
will not be cached on the proxy server.
By default, the proxy server is configured to cache all packages from all hosts
on external networks.

55

Configuring Parallels Virtuozzo Containers 4.7

vztt Configuration File
This file (/etc/vztt/vztt.conf) is the configuration file used by the vzpkg utility when
managing OS and application EZ templates.
The parameters in this file are presented on separate lines in the following format:
=
The table below describes these parameters:
Parameter Name

Description

VZTT_PROXY

The IP address or hostname of the caching proxy server to be used by the
vzpkg tool for managing OS and application EZ templates.

HTTP_PROXY

The IP address or hostname of the HTPP proxy server address, if you use
this server.

HTTP_PROXY_USER

The user name used by the HTTP proxy server for your authentication.

HTTP_PROXY_PASSWORD

The password of the user specified in the HTPP_PROXY_USER parameter
and used for your authentication by the HTTP proxy server.

METADATA_EXPIRE

Defines the period of time, in seconds, in the course of which the
downloaded software packages in the vzpkg cache are regarded as 'not
obsolete'. During this time, the vzpkg utility searches for the EZ template
packages in the local cache only (without checking the remote repositories
set for EZ templates). By default, this period is set to 86400 seconds (24
hours).

EXCLUDE

List of comma-separated packages that are not to be installed or updated
during the vzpkg execution. The package names should correspond to
the name of real packages in the repository and can contain file globs (e.g.
* and ?).

Managing Parallels Virtuozzo Containers Scripts
This section provides information on Parallels Virtuozzo Containers scripts used to automate and
perform some operations and procedures within your system.

56

Configuring Parallels Virtuozzo Containers 4.7

Overview
Along with Parallels Virtuozzo Containers configuration files responsible for the Parallels Virtuozzo
Containers system configuration, there are a number of scripts allowing you to customize the
Container behavior in different ways. These are the following scripts:
Script Name

Description

/vz/private//scripts/
user-defined actions on particular events. The currently defined
actions are start, stop, mount, unmount.
/etc/vz/conf/dists/scripts/




Navigation menu