Creating Configuration Files for New Linux Distributions
Distribution configuration files are used to distinguish among Containers running different Linux versions and to determine what scripts should be executed when performing the relevant Container-related operations (e.g. assigning a new IP address to the Container). Detailed information on distributions configurations files is provided in the Linux Distribution Configuration Files subsection of the Parallels Command Line Reference Guide.
All Linux distributions shipped with Parallels Server Bare Metal have their own configuration files located in the
/etc/vz/conf/dists directory on the Parallels server. However, you may wish to create your own distribution configuration files to support new Linux versions released. Let us assume that you wish your Containers to run the CentOS 5 Linux distribution and, therefore, have to make the
centos-5.conf distribution configuration file to define what scripts are to be executed while performing major tasks with Containers running this Linux version. To do this:
- In the Container configuration file (with the name of
centos-5 as the value of the
DISTRIBUTION variable (for example,
- Create the
centos-5.conf configuration file in the
/etc/vz/conf/dists directory. The easiest way to do it is copy one of the existing configuration files by executing the following command in the
# cp fedora.conf centos-5.config
In the example above, we assume that the
fedora.conf file is present in the
/etc/vz/conf/dists directory on the Parallels server. In case it is not, you may use any other distribution configuration file available on your server.
- Open the
centos.conf file for editing with the help of any text editor:
# vi centos-5.conf
- In the
centos-5.conf file, go to the first entry and, in the right part of the entry, specify the name of the script you wish to be run on issuing the
pctl command with the parameter specified in the left part of the entry. For example, if you wish the script to be executed while assigning a new IP address to your Container and the script has the
my_centos_script name, your entry should look as follows:
Note: The information on all acceptable parameters and their description are provided in the Parallels Command Line Reference Guide.
- Repeat Step 4 for all entries in the file.
- Place the scripts for the new Linux distribution to the
/etc/vz/conf/dists/scripts directory on the Node. Make sure the names of these scripts coincide with those specified in the