Difference between revisions of "Man/vz.conf.5"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(Bot: Automated import of articles *** existing text overwritten ***)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== NAME ==
 
== NAME ==
  
<p style="margin-left:11%; margin-top: 1em">vz.conf &minus;
+
<p style="margin-left:0; margin-top: 1em">vz.conf &minus;
 
global OpenVZ configuration file</p>
 
global OpenVZ configuration file</p>
  
 
== SYNOPSIS ==
 
== SYNOPSIS ==
  
<p style="margin-left:11%; margin-top: 1em"><b>/etc/vz/vz.conf</b></p>
+
<p style="margin-left:0; margin-top: 1em"><b>/etc/vz/vz.conf</b></p>
  
 
== DESCRIPTION ==
 
== DESCRIPTION ==

Latest revision as of 13:42, 11 September 2018

NAME[edit]

vz.conf − global OpenVZ configuration file

SYNOPSIS[edit]

/etc/vz/vz.conf

DESCRIPTION[edit]

This is the global configuration file for OpenVZ. It consists of lines in the form

PARAMETER="value"

All parameter names and values are case-sensitive. Quotes surrounding value are required if value contains spaces, and are optional otherwise. Extra spaces are not allowed. All unrecognized lines will be ignored.

Global parameters[edit]

VIRTUOZZO=yes|no

This parameter can be set to yes or no, and used by the vz init script. In case it is not set to yes, nothing will be done to boot up OpenVZ on this node.

LOCKDIR=directory

Set the directory to put lock files to.

VE0CPUUNITS=number

Value of this parameter sets cpuunits for CT0 (host system).

LOGGING=yes|no

Enables or disables logging. This parameter can be set to yes or no, default is yes.

LOGFILE=file

Set location of log file.

LOG_LEVEL=number

Set the logging level for the log file (does not affect console output). The greater the number is, the more information will be logged to the LOGFILE. Default is 0, which means to log normal messages and errors. If set to -1, only errors will be logged.

VERBOSE=number

Set the logging level for console/terminal output (does not affect log file). Default is 0, which means to log normal messages and errors. Increasing the number makes vzctl(8) more verbose.

MODULES_DISABLED=yes|no

If the value of this parameter is set to yes, no attempt to load kernel modules is made by the vz initscript. This is helpful on systems which have OpenVZ-specific features compiled into the kernel (i. e. not as modules).

IPTABLES_MODULES="module module ..."

List of iptables kernel modules to be loaded by vz initscript before loading OpenVZ modules (which is required for iptables to work inside containers).

VZFASTBOOT=yes|no

If the value of this parameter is set to yes, vz initscript called with start argument will start the containers with uncleanly shutdown quota state without performing quota reinitialization (which is usually a time-consuming process). After all the containers are started, the initscript when restarts those containers with unclean quota in a normal way (to recalculate/fix quotas).

VE_STOP_MODE=suspend|stop

If the value of this parameter is set to suspend or not set at all, vz initscript called with stop argument will try to suspend the running containers, instead of stopping them. Suspended containers when will be restored on vz start. This feature usually helps to decrease the reboot time. If a container fails to suspend, it will be stopped anyway.

VE_PARALLEL=number

A number of containers to be started or stopped simultaneously on node startup or shutdown. If not specified, the number is calculated based on amount of CPU cores. Used by the vz initscript.

TEMPLATE=directory

Value of this parameter is a directory in which all container template data are stored.

SKIP_SYSCTL_SETUP=yes

If this parameter is not present, init.d/vz start sets some sysctl.conf(5) parameters required or recommended by OpenVZ (with the help of vz-postinstall sysctl script), and then adds this parameter to vz.conf.

Network interface parameters[edit]

VE_ROUTE_SRC_DEV="device"

This parameter specifies the network device name which IP address will be used as the source IP. This is helpful in case more than one network interface is configured on HN and there is a need to specify the source IP address. Default is the first device in the network device list.

NEIGHBOUR_DEVS="all|detect|list:dev1 [dev2 ...]"

Controls on which interfaces to add/remove ARP records for a container IP, also which interfaces to use to query/announce ARP.

If set to all, an empty string, or unset, all possible network interfaces (i.e. the ones that are UP and doesn’t have NOARP, SLAVE, or LOOPBACK flags) are used. This is the default mode.

If set to detect, the right network interface (i.e. the one which is in the same subnet as a container IP) will be chosen automatically.

If the value starts with list: prefix, the space-separated list of interfaces following the prefix is used.

ERROR_ON_ARPFAIL=yes|no

In case the value of this parameter is set to yes, vzctl will fail to start a container if there is another host with the same IP present in the network. Any other value makes vzctl to only print the warning (which is the default behavior).

SKIP_ARPDETECT=yes|no

In case the value of this parameter is set to yes, vzctl will not use ARP queries when starting a container in order to detect if there is another host with the same IP present in the network. Note that for each IP, vzctl sends ARP query and waits up to 1 second for response. Any other value means to do ARP detection.

FORCE_ROUTE=yes|no

In case the value of this parameter is set to yes, vzctl will attempt to change an existing route to point to a container when starting a container if new route setup fails. Any other value means to only attempt to add new routes (default behavior).

Defaults for vzctl create[edit]

These parameters are defaults for vzctl create and can be overwritten by its appropriate command line options.

DEF_OSTEMPLATE=name

Default OS template to create a container from. Corresponds to --ostemplate option of vzctl create.

CONFIGFILE=name

Default configuration file (/etc/vz/conf/ve-name.conf-sample) used to create a new container. Corresponds to --config option of vzctl create.

VE_LAYOUT=simfs|ploop[:{plain|expanded|raw}]

Default CT filesystem layout for a new container, can either be ploop or simfs. In case ploop is used, one can additionally specify ploop disk image format after a colon. Possible ploop formats are expanded, plain and raw. Default is expanded. Using raw is not recommended and is not supported.

Corresponds to --layout option of vzctl create.

Defaults for containers[edit]

Below parameters are defaults for containers, and can be overwritten by parameters in ctid.conf(5) per-container configuration file.

DISK_QUOTA=yes|no

In case the value of this parameter is set to no, all disk quota operations are disabled.

VE_ROOT=directory

Value of this parameter is the directory which serves as container root mount point. Value must contain literal string $VEID, which will be substituted with the actual numeric CT ID.

VE_PRIVATE=directory

Value of this parameter is the directory in which all the files and directories specific to that container are stored. Value must contain literal string $VEID, which will be substituted with the actual numeric CT ID.

STOP_TIMEOUT="number"

Time to wait for a container to shut down on vzctl stop, before forcibly killing it, in seconds. Hardcoded to 120 if not set.

NAMESERVER="ip [ip ...]"

Default value for containers nameserver(s). Several name server addresses are divided by spaces. If set to inherit, values from host system’s /etc/resolv.conf are used.

SEARCHDOMAIN="domain [domain ...]"

Default value for containers search domains. Several search domains are divided by spaces. If set to inherit, values from host system’s /etc/resolv.conf are used.

Most of the other parameters that appear in per-container configuration files ctid.conf(5) can be also set here. Still, it is recommended to keep TEMPLATE, VE_PRIVATE and VE_ROOT in this configuration file, and all the other container related parameters in per-container configuration files.

SEE ALSO[edit]

vzctl(8), ctid.conf(5).

LICENSE[edit]

Copyright (C) 2000-2011, Parallels, Inc. Licensed under GNU GPL.