3.8. Managing Container Resource Configuration

Any container is configured by means of its own configuration file. You can manage container configurations in a number of ways:

  1. Using configuration sample files shipped with OpenVZ. These files are used when a new container is being created (for details, see Section 1.2.2, “OpenVZ Containers”). Currently, the following configuration sample files are provided:

    • basic for creating standard containers.
    • confixx for creating containers that are to run the Confixx control panel.
    • vswap.plesk for creating containers with the Plesk control panel.
    • vswap.256MB for creating containers with 256 MB of main memory.
    • vswap.512Mb for creating containers with 512 MB of main memory.
    • vswap.1024Mb for creating containers with 1024 MB of main memory.
    • vswap.2048Mb for creating containers with 2048 MB of main memory.

    Note

    Note: Configuration sample files cannot contain spaces in their names.

    Any sample configuration file can also be applied to an existing container. You would do this if, for example, you want to upgrade or downgrade the overall resources configuration of a particular container:

    # prlctl set MyCT --applyconfig basic

    This command applies all the parameters from the ve-basic.conf-sample file to the container MyCT. When you install OpenVZ on your hardware node, the default container samples are put to the /etc/vz/conf directory. They have the following format: ve-<name>.conf-sample (for example, ve-basic.conf-sample).

  2. Using specific utilities for preparing configuration files in their entirety. The tasks these utilities perform are described in the following subsections of this section.
  3. The direct creating and editing of the corresponding container configuration file (/etc/vz/conf/<UUID>.conf). This can be performed with the help of any text editor. The instructions on how to edit container configuration files directly are provided in the four preceding sections. In this case you have to edit all the configuration parameters separately, one by one.