This guide provides information on installing Virtuozzo 7 over a network using a PXE (Preboot Execution Environment) server. You will also learn how to upgrade your existing system to Virtuozzo 7 over a network.
You can install Virtuozzo in a PXE environment using one of the following ways:
-
Manual installation. When performing this kind of installation, you are asked questions by the Virtuozzo installer and define the necessary installation and configuration settings. Manual installation is recommended if you plan to install the product on a small number of physical servers.
-
Unattended installation. In this kind of installation, the Virtuozzo installer uses a kickstart file to determine the necessary installation and configuration settings. Unattended installation assumes that no interaction is required on your part and is recommended if you plan to install the product on a multitude of physical servers.
To install Virtuozzo 7 over a network, you need to complete the following steps:
-
Prepare for installation from a PXE server.
-
Create a kickstart file. This step is only required if you plan to automate the procedure of deploying Virtuozzo on your servers.
-
Install Virtuozzo.
All these steps are explained in the following chapters in detail.
The process of preparing for installation over network with a PXE server includes the following steps:
-
Choosing servers for the PXE installation.
-
Installing the necessary software on the PXE server.
-
Configuring the TFTP server.
-
Setting up a DHCP server.
-
Setting up an HTTP server.
-
Configuring the Virtuozzo server.
All these steps are described below in detail.
First, you should decide on the servers to participate in the PXE installation. You need these servers:
-
PXE server. This is a server allowing your servers to boot and install Virtuozzo over the network. Any server capable of running a Linux operating system and having a network interface card (NIC) can play the role of a PXE server.
-
DHCP server. This is a standard DHCP server serving computers on your network with the necessary TCP/IP settings. You can use an existing DHCP server, if you have one, or set up a DHCP server from scratch. In the latter case, you can install it on the PXE server or use a dedicated server.
-
Virtuozzo server. This is a server running Virtuozzo. The server must meet the requirements described in the Preparing for Installation chapter of the Virtuozzo 7 Installation Guide. In addition to the requirements listed in this chapter, the server must have a NIC with PXE support to be able to boot from the PXE server.
-
HTTP or FTP server. This is a server storing the Virtuozzo installation files. You can use an existing HTTP server, if you have one, or set up an HTTP server from scratch. In the latter case, you can install it on the PXE server or use a dedicated server.
This guide assumes that you will store the installation files on an HTTP server and use HTTP as the installation protocol.
Next, you are supposed to install the necessary software on the PXE server. First of all, you need to install a Linux operating system on the server. There are no specific requirements for which operating system to use, so you can choose any (e.g., CentOS 6 or Fedora 17).
Once your system is up and running, install the following packages:
-
tftp-server
-
httpd
(Install this package only if you plan to deploy the PXE and HTTP servers on the same physical server.) -
syslinux
-
dhcp
(Install this package only if you plan to deploy the PXE and DHCP servers on the same physical server.)
Assuming that your PXE server is running an RHEL-like operating system, you can use the yum
utility to install the packages:
# yum install tftp-server dhcp httpd syslinux
In the next step, you need to configure the TFTP server that you installed in the previous step. This section describes the process of configuring the TFTP server for BIOS-based systems. For information on how to configure the TFTP server for installing Virtuozzo on EFI-based systems, see Configuring for EFI in the Red Hat Enterprise Linux Installation Guide at https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-netboot-pxe-config-efi.html.
To configure the TFTP server:
-
On the PXE server, open the
/etc/xinetd.d/tftp
file, and edit it as follows:service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -v -s /tftpboot per_source = 11 cps = 100 2 flags = IPv4 }
Once you are done, save the file.
-
Copy the following files to the
/tftpboot
directory (if this directory does not exist, create it under the root (/
) directory):-
vmlinuz
-
initrd.img
-
menu.c32
-
pxelinux.0
These files are necessary to start the installation of Virtuozzo. You can find the first two files in the
/isolinux
directory of the Virtuozzo distribution. Themenu.c32
andpxelinux.0
files are located in thesyslinux
installation directory on the PXE server (usually, this is the/usr/share/syslinux
or/usr/lib/syslinux
directory). -
-
Create the
/tftpboot/pxelinux.cfg
directory, and inside this directory, make thedefault
file. -
Open the default file for editing, and add the following strings to it:
default menu.c32 prompt 0 timeout 100 ontimeout VZ menu title Virtuozzo Boot Menu label VZ menu label Install Virtuozzo kernel vmlinuz append initrd=initrd.img ksdevice=eth0
For detailed information on the parameters you can specify in the
/tftpboot/pxelinux.cfg/default
file and their configuration, see the documentation forsyslinux
and its man pages. -
Restart the
xinetd
service:# /etc/init.d/xinetd restart
-
If necessary, configure your firewall on the PXE server to allow access to the TFTP server.
Note
|
Note: When running the TFTP server, you might get the "Permission denied" error. In this case, you may try to fix the problem by running the following command on the server: |
Now you can proceed with configuring a DHCP server. To configure the DHCP server for installing Virtuozzo over the network, open the dhcpd.conf
file (usually, it is located in the /etc
or /etc/dhcp
directory) for editing and add the following strings to this file:
next-server <PXE_server_IP_address>; filename "/pxelinux.0";
Note
|
Note: To configure a DHCP server for installation on EFI-based systems, specify |
Now that you have set up the TFTP and DHCP servers, you need to make the Virtuozzo distribution files available for installation over the network. To do this:
-
Set up an HTTP server. You can also use an existing HTTP server, if you have one.
-
Copy the contents of your Virtuozzo installation DVD to some directory on the HTTP server (e.g.,
/var/www/html/vz
). -
On the PXE server, open the
/tftpboot/pxelinux.cfg/default
file for editing, and specify the path to the Virtuozzo installation files on the HTTP server.NoteNote: For EFI-based systems, the file you need to edit has the name of
/tftpboot/pxelinux.cfg/efidefault
or/tftpboot/pxelinux.cfg/<PXE_server_IP_address>
.Assuming that you have the installation files in the
/var/www/html/vz
directory on the HTTP server with the IP address of 198.123.123.198 and theDocumentRoot
directory is set to/var/www/html
, you can add the following option to theappend
line of thedefault
file to make the Virtuozzo files accessible over HTTP:method=http://198.123.123.198/vz
So your default file should look similar to the following:
default menu.c32 prompt 0 timeout 100 ontimeout VZ menu title Virtuozzo Boot Menu label VZ menu label Install Virtuozzo kernel vmlinuz append initrd=initrd.img ksdevice=eth0 method=http://198.123.123.198/vz
Now that you have prepared all the servers, you can start the Virtuozzo installation:
-
Restart the Virtuozzo server after configuring its BIOS settings to boot from the network.
NoteNote: If you plan to perform an unattended installation of Virtuozzo, you need to additionally create a kickstart file. See [_creating_a_kickstart_file] for information about creating kickstart files and installing Virtuozzo with these files.
-
Once the server boots, you see a dialog box asking you to select the system to install. Select the entry for Virtuozzo (Install Virtuozzo in our case), and press Enter.
-
Follow the on-screen instructions to install Virtuozzo. For details, consult the Virtuozzo 7 Installation Guide.
If you plan to perform an unattended installation of Virtuozzo, you can use a kickstart file. A kickstart file is a simple text file containing the information used by the Virtuozzo installer to install and configure your physical server. The format of kickstart files used in Virtuozzo installations is similar to that used to perform an unattended installation of Red Hat Enterprise Linux (RHEL). To create a kickstart file, you can use your favorite text editor.
You can include in your Virtuozzo kickstart file two groups of options:
-
The first group comprises the same options that you use when installing any RHEL-like distribution.
-
The second group comprises the options specific to Virtuozzo.
Both groups of options are described in the following sections in detail.
Your kickstart file may include any of the standard Linux options used in kickstart files for installing Linux operating systems. For the full list of these options and their explanations, consult the respective Linux documentation (e.g., the Red Hat Enterprise Linux Installation Guide).
Listed below are the mandatory options and commands that you must include in each kickstart file:
Option | Description | ||
---|---|---|---|
|
Specifies authentication options for the Virtuozzo physical server. |
||
|
Specifies the way of installing the bootloader. |
||
|
Tells the system to install Virtuozzo either from |
||
|
Sets the system keyboard type. |
||
|
Sets the language to use during installation and the default language to use on the installed system. |
||
|
Creates partitions on the server. |
||
|
Sets the system’s root password. |
||
|
Sets the system time zone. |
||
|
Cleans all partition tables on disk drives.
|
Note
|
Notes:
|
When creating a kickstart file to use for upgrading existing installations of Virtuozzo Server Bare Metal to Virtuozzo 7, use the following options:
-
bootloader
-
keyboard
-
lang
-
timezone
You must also specify the upgrade
option instead of install
to tell the installer to upgrade the system rather than to perform a fresh installation of Virtuozzo 7.
Along with standard Linux options, Virtuozzo provides a number of specific parameters and keywords that you need to add to your kickstart file.
The table below lists all available parameters and keywords.
Parameter | Description | ||
---|---|---|---|
|
Mandatory. Installs the Virtuozzo product key on the server. This key is needed to start using the Virtuozzo 7 software. |
||
|
Mandatory. Specify whether you want to participate in the Customer Experience Program.
|
||
|
Optional. Invokes the |
||
|
Deprecated. To configure iptables modules for containers, use the |
||
|
Optional. Sets the URL of the repository and repository mirrors to use for handling EZ OS and application templates. By default, Virtuozzo uses the following URLs:
To use your own URL, you first need to specify the name of the respective Linux distribution, followed by
|
||
|
Optional. Does the following:
Using this option, you can ensure that you have the latest Virtuozzo software packages and templates right after the installation, without the need to manually check for updates. |
||
|
Optional. Skips installing the pre-created and pre-cached EZ templates on the server. The current version of Virtuozzo is shipped with only one pre-created and pre-cached OS EZ template: |
||
|
Optional. Installs EZ templates on the server. All available templates are listed in the %eztemplates centos-6-x86 devel-centos-6-x86 When using this parameter, keep in mind the following:
|
||
|
Optional. Ignores the specified drives or all drives except the one specified. Used with one of the following arguments:
|
||
|
Optional. Downloads and installs the VA Agent and Power Panel components on the server. After doing so, you can register the server with the Virtual Automation application and to use this application to manage virtual machines and containers residing on it via a standard web browser. The VA Agent and Power Panel components are downloaded from the official repository. |
||
|
Optional. Creates a special container on the server and install the PVA management server and Control Center components in the container. Once the container is created and the components are installed, the container starts acting as the Master Server, ensuring the communication between the server and Virtual Automation. The
If you use several parameters, separate them by spaces. For example: pvamn --ip 10.10.10.10 --hostname hostname.com Once the installation is complete, you can log in to Virtual Automation by opening The PVA management node and Control Center components are downloaded from the official repository.
|
||
|
Optional. Defines the range of IP addresses the DHCP server will be able to allocate to virtual machines in host-only networks; virtual adapter IP address and subnet mask; DHCP server IP address; and virtual network name. If you omit one or more parameters, the following default values will be used:
|
||
|
Specifies the package groups to install on the server:
|
Parameter | Description | ||
---|---|---|---|
|
Does the following:
Metadata servers are part of any Virtuozzo storage cluster. They store metadata about chunk servers, data chunks, and chunk replicas. You must set up at least one metadata server for a cluster to function.
|
||
|
Mandatory. Creates a new or supplies the existing password when creating or joining Virtuozzo storage clusters.
|
||
|
Does the following:
|
||
|
Sets the number of minutes during which MDS servers, chunk servers, and clients can try to register with the master MDS server and join the cluster. Every minute, one registration attempt is made. The default value is 0, which assumes that the master MDS server is already up and running. |
||
|
Configures the server as a chunk server for the Virtuozzo storage cluster with the name of
Do not use the options, except for Chunk servers store the contents of virtual machines and containers as 64MB data chunks. All data chunks are replicated, and their replicas are stored on different chunk servers. You must set up at least one chunk server for a cluster to function. |
||
|
Configures the server as a client for the Virtuozzo storage cluster with the name of
Clients are computers with Virtuozzo 7 from where you run virtual machines and containers stored on your Virtuozzo storage. |
||
|
Optional. Installs the Virtuozzo storage product key on the server. This key is needed to start using the Virtuozzo storage functionality. |
You do not need to use any options specific to Virtuozzo in kickstart files to upgrade your system to Virtuozzo 7. You can, however, specify any of the options listed in the table above, if necessary. In this case, the specified options will redefine the ones in the original installation. For example, you can use the --key
option to install a new license for Virtuozzo 7 on the server or the --cep
option to cancel your participation in the Virtuozzo Customer Experience Program.
Below is an example of a kickstart file that you can use to install and configure Virtuozzo in unattended mode. You can use this file as the basis for creating your own kickstart files.
# Install Virtuozzo install # Uncomment the line below to install Virtuozzo in a completely unattended mode # cmdline # Use the path of http://example.com/vz to get the installation files. url --url http://example.com/vz # Use English as the language during the installation and as the default system # language. lang en_US.UTF-8 # Use the English keyboard type. keyboard us # Uncomment the line below to remove all partitions from the SDA hard drive and # create these partitions: /boot, /, /vz, and swap. # clearpart --drives=sda --all --initlabel # zerombr part /boot --fstype=ext4 --size=512 part / --fstype=ext4 --size=20096 part /vz --fstype=ext4 --size=40768 --grow part swap --size=4000 # Use a DHCP server to obtain network configuration. network --bootproto dhcp # Set the root password for the server. rootpw xxxxxxxxx # Use the SHA-512 encryption for user passwords and enable shadow passwords. auth --enableshadow --passalgo=sha512 # Set the system time zone to America/New York and the hardware clock to UTC. timezone --utc America/New_York # Set sda as the first drive in the BIOS boot order and write the boot record to # mbr. bootloader --location=mbr # Tell the Virtuozzo installer to reboot the system after installation. reboot # Install the Virtuozzo license on the server. key XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX # Create the virt_network1 Virtual Network on the server and associate it with the # network adapter eth0. vznetcfg --net=virt_network1:eth0 # Configure the ip_tables ipt_REJECT ipt_tos ipt_limit modules to be loaded in # Containers. # Use the http://myrepository.com to handle Fedora OS and application templates. vztturlmap $FC_SERVER http://myrepository.com # Install the listed EZ templates. Cache all OS templates after installation. Skip # the installation of pre-created templates. nosfxtemplate %eztemplates --cache centos-6-x86_64 centos-6-x86 mailman-centos-6-x86_64 mailman-centos-6-x86 # Install the packages for Virtuozzo on the server. %packages @base @core @vz @ps
You can use the file above to install Virtuozzo on BIOS-based systems. For installation on EFI-based systems, you need to modify the following places in the file (the changes are highlighted in bold):
# The following 4 commands are used to remove all partitions from the SDA hard # drive and create these partitions: /boot/efi (required for EFI-based systems), # /boot, /, /vz, and swap. # clearpart --drives=sda --all --initlabel part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype=ext4 --size=512 part / --fstype=ext4 --size=20096 part /vz --fstype=ext4 --size=40768 --grow part swap --size=4000 # Configure the bootloader. bootloader --location=partition
Below is an example of a kickstart file you can use to upgrade your system to Virtuozzo 7.
# Upgrade to Virtuozzo rather than perform a fresh installation. upgrade # Use the path of http://example.com/vz to get the installation files. url --url http://example.com/vz # Use English as the language during the upgrade and as the default system # language. lang en_US.UTF-8 # Use the English keyboard type. keyboard us # Set the system time zone to America/New York and the hardware clock to UTC. timezone --utc America/New_York # Upgrade the bootloader configuration. bootloader --upgrade
To install Virtuozzo using a kickstart file, you first need to make the kickstart file accessible over the network. To do this:
-
Copy the kickstart file to the same directory on the HTTP server where the Virtuozzo installation files are stored (e.g., to
/var/www/html/vz
). -
Add the following string to the
/tftpboot/pxelinux.cfg/default
file on the PXE server:ks=<HTTP_server_address>/<path_to_kickstart_file>
NoteNote: For EFI-based systems, the file you need to edit has the name of
/tftpboot/pxelinux.cfg/efidefault
or/tftpboot/pxelinux.cfg/<PXE_server_IP_address>
.
Assuming that the HTTP server has the IP address of 198.123.123.198, the DocumentRoot directory is set to /var/www/html
and the full path to your kickstart file on this server is /var/www/html/vz/ks.cfg
, your default
file may look like the following:
default menu.c32 prompt 0 timeout 100 ontimeout VZ menu title Virtuozzo Boot Menu label VZ menu label Install Virtuozzo kernel vmlinuz append initrd=initrd.img ks=http://198.123.123.198/vz/ks.cfg method=http://198.123.123.198/vz ksdevice=eth0
Now you can start installing Virtuozzo. To do this:
-
Restart the server (see [_configuring_the_virtuozzo_server]).
-
After the server boots, a dialog box is displayed asking you to select the system to install. Select the entry for Virtuozzo, and press Enter. The installation is launched automatically and proceeds without your interaction.