4.1. Preparing Environment¶
This section explains how to set up the environment for installation over network.
4.1.1. Installing PXE Components¶
You will need these components to set up a PXE environment:
TFTP server. This is a machine that allows your servers to boot and install Virtuozzo Infrastructure Platform over the network. Any machine that can run Linux and is accessble over network can be a TFTP server.
DHCP server. This is a standard DHCP machine serving TCP/IP settings to computers on your network.
HTTP server. This is a machine serving Virtuozzo Infrastructure Platform installation files over network.
Note
You can also share Virtuozzo Infrastructure Platform distribution over network via FTP (e.g., with
vsftpd) or NFS.
The easiest way is to set up all of these on the same physical machine:
# yum install tftp-server syslinux httpd dhcp
You can also use servers that already exist in your infrastructure. For example, skip httpd and dhcp if you already have the HTTP and DHCP servers.
4.1.2. Configuring TFTP Server¶
This section describes how to configure the TFTP server for BIOS-based systems. For information on how to configure it for installing Virtuozzo Infrastructure Platform on EFI-based systems, see the Red Hat Enterprise Linux Installation Guide.
Do the following:
On the server, open the
/etc/xinetd.d/tftpfile, 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.
Create the
/tftpbootdirectory and copy the following files to it:vmlinuz,initrd.img,menu.c32,pxelinux.0.
These files are necessary to start installation. You can find the first two in the
/images/pxebootdirectory of the Virtuozzo Infrastructure Platform distribution. The last two files are located in thesyslinuxdirectory (usually/usr/share/syslinuxor/usr/lib/syslinux).Create the
/tftpboot/pxelinux.cfgdirectory and make thedefaultfile in it.# mkdir /tftpboot/pxelinux.cfg # touch /tftpboot/pxelinux.cfg/default
Add the following lines to
default:default menu.c32 prompt 0 timeout 100 ontimeout ASTOR menu title Boot Menu label ASTOR menu label Install Virtuozzo Infrastructure Platform kernel vmlinuz append initrd=initrd.img ip=dhcpNote
For detailed information on parameters you can specify in this file, see the documentation for
syslinux.Restart the
xinetdservice:# /etc/init.d/xinetd restart
If necessary, configure firewall to allow access to the TFTP server (on port 69 by default).
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:
# restorecon -Rv /tftboot/.
4.1.3. Setting Up DHCP Server¶
To set up a DHCP server for installing Virtuozzo Infrastructure Platform over network, add the following strings to the dhcpd.conf file, which is usually located in the /etc or /etc/dhcp directory:
next-server <PXE_server_IP_address>;
filename "/pxelinux.0";
Note
To configure a DHCP server for installation on EFI-based systems, specify filename "/bootx64.efi" instead of filename "/pxelinux.0" in the dhcpd.conf file, where /bootx64.efi is the directory to which you copied the EFI boot images when setting up the TFTP server.
4.1.4. Setting Up HTTP Server¶
Now that you have set up the TFTP and DHCP servers, you need to make the Virtuozzo Infrastructure Platform 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 Infrastructure Platform installation DVD to some directory on the HTTP server (e.g.,
/var/www/html/astor).On the PXE server, open the
/tftpboot/pxelinux.cfg/defaultfile for editing, and specify the path to the Virtuozzo Infrastructure Platform installation files on the HTTP server.Note
For EFI-based systems, the file you need to edit has the name of
/tftpboot/pxelinux.cfg/efidefaultor/tftpboot/pxelinux.cfg/<PXE_server_IP_address>.Assuming that you have the installation files in the
/var/www/html/astordirectory on the HTTP server with the IP address of 198.123.123.198 and theDocumentRootdirectory is set to/var/www/html, you can add the following option to theappendline of thedefaultfile to make the Virtuozzo Infrastructure Platform files accessible over HTTP:inst.repo=http://198.123.123.198/astor
So your default file should look similar to the following:
default menu.c32 prompt 0 timeout 100 ontimeout ASTOR menu title Boot Menu label ASTOR menu label Install Virtuozzo Infrastructure Platform kernel vmlinuz append initrd=initrd.img ip=dhcp inst.repo=http://198.123.123.198/astor