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). For details on distribution configurations files, see
Linux Distribution Configuration Files
in the
Parallels Cloud Server 6.0 Command Line Reference Guide
.
All Linux distributions shipped with Parallels Cloud Server 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
/etc/vz/conf/
<CT_ID>
.conf
), specify
centos-5
as the value of the
DISTRIBUTION
variable (for example,
DISTRIBUTION="centos-5"
).
-
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
/etc/vz/conf/dists
directory:
# 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
prlctl
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:
ADD_IP=my_centos_script-add_ip.sh
Note:
All acceptable parameters are described in the
Parallels Cloud Server 6.0 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
centos-5.conf
file.
|