vz.conf(5)
โจ vz.conf(5) โ Containers โจ
okay bestie, gather round, because this is the global OpenVZ configuration file ๐ it's vz.conf(5), and yeah it's giving "one file to rule your whole node" energy. let's get into it ๐ซถ
๐ธ NAME ๐ธ
vz.conf โ the global OpenVZ configuration file. that's her. that's the main character. ๐
๐ SYNOPSIS ๐
/etc/vz/vz.conf
๐ DESCRIPTION ๐
so this is the global config file for OpenVZ. it's just lines, one per setting, and every line looks like this:
PARAMETER="value"
and the rules are strict bestie, no cap:
- every parameter name and every value is case-sensitive, so don't get cute with the capitalization ๐
- the quotes around
valueare required if your value has spaces in it, and optional if it doesn't - extra spaces are NOT allowed โ do not add them, she will not forgive you
- any line she doesn't recognize? ignored. fully ghosted. ๐
๐ Global parameters ๐
VIRTUOZZO=yes|noโ set it toyesorno, and thevzinit script reads it. if it is not set toyes, literally nothing happens to boot up OpenVZ on this node. like, she simply will not start. ๐LOCKDIR=directoryโ the directory where lock files go. that's it, that's the job. ๐VE0CPUUNITS=numberโ setscpuunitsfor CT0, aka the host system itself.LOGGING=yes|noโ turns logging on or off.yesorno, and the default isyes. โจLOGFILE=fileโ where the log file lives. ๐LOG_LEVEL=numberโ the logging level for the log file (and btw this does not touch console output). the bigger the number, the more stuff gets logged toLOGFILE. default is0, which means normal messages and errors get logged. set it to-1and only errors make the cut. ๐VERBOSE=numberโ the logging level for console/terminal output (and this one does not touch the log file). default is0, meaning normal messages and errors. crank the number up andvzctl(8)gets more verbose. ๐ฃ๏ธMODULES_DISABLED=yes|noโ if it'syes, thevzinitscript makes no attempt at all to load kernel modules. super handy on systems where the OpenVZ-specific features are compiled right into the kernel (i.e. not as modules). ๐งIPTABLES_MODULES="module module ..."โ the list of iptables kernel modules that thevzinitscript loads before it loads the OpenVZ modules (which is required for iptables to work inside containers). ๐ฅVZFASTBOOT=yes|noโ if it'syes, thevzinitscript called with thestartargument will start containers that have an uncleanly shutdown quota state without doing quota reinitialization (which is usually a whole time-consuming ordeal, ngl). after all the containers are started, the initscript restarts those unclean-quota containers in the normal way, so quotas get recalculated/fixed. ๐ฎโ๐จVE_STOP_MODE=suspend|stopโ if it'ssuspend(or just not set at all), thevzinitscript called with thestopargument tries to suspend running containers instead of stopping them. suspended containers get restored onvz start. this feature usually helps cut down reboot time. and if a container fails to suspend? it gets stopped anyway, no drama. ๐VE_PARALLEL=numberโ how many containers get started or stopped at the same time on node startup or shutdown. if you don't specify it, the number is calculated based on how many CPU cores you have. used by thevzinitscript. ๐โโ๏ธ๐โโ๏ธTEMPLATE=directoryโ a directory, and inside it lives all your container template data. ๐ฆSKIP_SYSCTL_SETUP=yesโ if this parameter is not present,init.d/vz startsets somesysctl.conf(5)parameters that OpenVZ requires or recommends (with the help of thevz-postinstallsysctlscript), and then adds this parameter tovz.conf. so basically she writes it in herself after doing the thing. โ๏ธ
๐ Network interface parameters ๐
VE_ROUTE_SRC_DEV="device"โ names the network device whose IP address gets used as the source IP. this is a lifesaver when you've got more than one network interface configured on the HN and you need to pin down which source IP address to use. default is the first device in the network device list. ๐ฐ๏ธNEIGHBOUR_DEVS="all|detect|list:dev1 [dev2 ...]"โ controls which interfaces get ARP records added/removed for a container IP, and also which interfaces are used to query/announce ARP. details below bestie ๐- if it's set to
all, an empty string, or left unset โ all possible network interfaces are used, i.e. the ones that are UP and don't haveNOARP,SLAVE, orLOOPBACKflags. this is the default mode. โจ - if it's set to
detect, the right network interface gets chosen automatically โ meaning the one sitting in the same subnet as a container IP. ๐ต๏ธโโ๏ธ - if the value starts with the
list:prefix, then the space-separated list of interfaces following that prefix is what gets used. ๐
- if it's set to
ERROR_ON_ARPFAIL=yes|noโ if it'syes,vzctlwill fail to start a container when there's another host on the network with the same IP. any other value meansvzctljust prints the warning โ and that warning-only behavior is the default. โ ๏ธSKIP_ARPDETECT=yes|noโ if it'syes,vzctlwill not use ARP queries when starting a container to detect whether another host with the same IP is out there on the network. heads up though: for each IP,vzctlsends an ARP query and waits up to 1 second for a response. any other value means ARP detection happens. โฑ๏ธFORCE_ROUTE=yes|noโ if it'syes,vzctlwill attempt to change an existing route so it points to a container when starting a container, if the new route setup fails. any other value means it only attempts to add new routes โ that's the default behavior. ๐ฃ๏ธ
๐ Defaults for vzctl create ๐
these are the defaults for vzctl create, and they can be overwritten by the appropriate command line options of that command. ๐ซ
DEF_OSTEMPLATE=nameโ the default OS template to create a container from. corresponds to the--ostemplateoption ofvzctl create. ๐งCONFIGFILE=nameโ the default configuration file (/etc/vz/conf/ve-name.conf-sample) used to create a new container. corresponds to the--configoption ofvzctl create. ๐VE_LAYOUT=simfs|ploop[:{plain|expanded|raw}]โ the default CT filesystem layout for a new container, and it can be eitherplooporsimfs. if you go withploop, you can also specify the ploop disk image format after a colon. the possible ploop formats areexpanded,plain, andraw. default isexpanded. usingrawis not recommended and is not supported. ๐ซ corresponds to the--layoutoption ofvzctl create. ๐
๐ฆ Defaults for containers ๐ฆ
these ones below are defaults for containers, and they can be overwritten by parameters in the ctid.conf(5) per-container configuration file. ๐ซถ
DISK_QUOTA=yes|noโ if it's set tono, all disk quota operations are disabled. periodt. ๐VE_ROOT=directoryโ the directory that serves as the container root mount point. the value must contain the literal string$VEID, which gets substituted with the actual numeric CT ID. ๐ขVE_PRIVATE=directoryโ the directory where all the files and directories specific to that container are stored. the value must contain the literal string$VEID, which gets substituted with the actual numeric CT ID. ๐ขSTOP_TIMEOUT="number"โ how long to wait for a container to shut down onvzctl stop, before forcibly killing it, in seconds. hardcoded to120if it's not set. โณNAMESERVER="ip [ip ...]"โ the default value for the container's nameserver(s). multiple name server addresses are separated by spaces. if it's set toinherit, the values from the host system's/etc/resolv.confare used. ๐SEARCHDOMAIN="domain [domain ...]"โ the default value for the container's search domains. multiple search domains are separated by spaces. if it's set toinherit, the values from the host system's/etc/resolv.confare used. ๐
most of the other parameters that show up in the per-container configuration files ctid.conf(5) can also be set right here. still, it is recommended to keep TEMPLATE, VE_PRIVATE, and VE_ROOT in this configuration file, and put all the other container related parameters in the per-container configuration files. like, that's the vibe. keep it tidy bestie ๐งนโจ
๐ SEE ALSO ๐
๐ LICENSE ๐
Copyright (C) 2000-2011, Parallels, Inc. Licensed under GNU GPL.
and that's the whole page, bestie ๐ฅน๐ this was vz.conf(5) from OpenVZ, dated 20 Apr 2015. you ate that. now go configure your node responsibly, ily ๐ซถ๐ธโจ
๐ฆ where this page comes from
- ubuntu jammy: vzctl 4.9.4-6
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms