Previous page

Next page

Locate page in Contents

Print this page

Linux Distribution Configuration Files

Some Parallels Server Bare Metal utilities (e.g. pctl ) 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 Server Bare Metal uses special distribution configuration files located in the /etc/vz/conf/dists directory on the server.

There are a number of distribution configuration files shipped with Parallels Server Bare Metal by default ( centos.conf , fedora-core.conf , gentoo.conf , etc.). To view all configuration files available on your Parallels Server Bare Metal, 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. fedora-core-7.conf ).

Any distribution configuration file consists of a number of entries in the form of < parameter_name >=< script_name > where < parameter_name > denotes the name of the parameter defining the operation when the script in the right part of the entry is to be executed and < script_name > 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 Server Bare Metal, 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 < distribution_name >-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:

    pctl start CT_ID

    pctl set CT_ID --ipadd < ip_address >

    pctl set CT_ID --ipadd < ip_address > --ipdel all

  • DEL_IP : the script specified as the value of this parameter has the default name of < distribution_name >-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:

    pctl set CT_ID --ipdel < ip_address >

    pctl set CT_ID --ipdel all

  • SET_HOSTNAME : the script specified as the value of this parameter has the default name of < distribution_name >-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:

    pctl set CT_ID --hostname < name >

  • SET_DNS : the script specified as the value of this parameter has the default name of < distribution_name >-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:

    pctl set CT_ID --searchdomain < domain > --nameserver < ip_address >

  • SET_USERPASS : the script specified as the value of this parameter has the default name of < distribution_name >-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:

    pctl set CT_ID --userpasswd < user:passwd >

  • SET_UGID_QUOTA : the script specified as the value of this parameter has the default name of < distribution_name >-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:

    pctl set CT_ID --quotaugidlimit < num >

  • POST_CREATE : the script specified as the value of this parameter has the default name of < distribution_name >-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 server on executing the following command:

    pctl create CT_ID

  • POST_MIGRATE : the script specified as the value of this parameter has the default name of < distribution_name >-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 server and executed on performing the aforementioned operations on the Containers. After an operation has been initiated, the pctl 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, pctl 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.