This article describes the procedure for deploying a PXE environment for a Parallels Cloud Server and Parallels Server Bare Metal installation.
The purpose of the article is to give a step-by-step tutorial for quick PXE deployment using an example.
More details about and options for PXE installation can be found in the Installing Parallels Cloud Server via PXE guide.
Automatic installation of Parallels Cloud Server via PXE requires three services in the network to be running:
- Trivial FTP service (TFTP)
- Dynamic Host Configuration Protocol service (DHCP)
- Web service
If there are such services in the network already, it is possible to skip the initial steps and modify these services according to the later steps described in this article; otherwise, follow all of the following steps.
Deploy a separate server for DHCP, TFTP, and web services. In this example, it is a CentOS 6 x86_64-based machine.
Install services via yum:
# yum install tftp-server dhcp httpd syslinux syslinux-tftpboot
Configure TFTP service:
/etc/xinetd.d/tftpand verify that the service is enabled and that the server root points to /tftpboot:
disable=no server_args= -v -s /tftpboot
You may use the attached configuration file as an example.
3.2. Create the following folder structure:
# mkdir -p /tftpboot/pxelinux.cfg
After installing the syslinux-tftpboot package, you should see the folder /tftpboot with several files inside. Make sure it has the menu.c32 and pxelinux.0 files. If there are no such files, locate them in either
3.3. Create a default boot configuration under
# vim /tftpboot/pxelinux.cfg/default
Set it to point to the correct kernel, initrd image, and repository.
An example of a working configuration file is attached.
NOTE: The path to the kernel and initrd image is relative to the TFTP root folder, i.e., to /tftpboot/.
For more syslinux boot menu options, refer to Syslinux wiki.
3.4. Restore SELinux security contexts:
# restorecon -Rv /tftpboot
Configure DHCP service by editing /etc/dhcp/dhcpd.conf.
4.1. Set the allow booting, allow bootp, and authoritative options.
4.2. Point the next-server option to your TFTP server IP.
4.3. Set the filename option to "/pxelinux.0."
4.4. Set IP settings for DHCP clients.
An example of dhcpd.conf is attached.
Create a web directory for Parallels Cloud Server packages:
# mkdir -p /var/www/html/pcs/6.0/
Download the Parallels Cloud Server ISO image and mount it:
# mount –o loop /path/to/pcs.iso /mnt
Copy packages to the web folder:
# cp -pr /mnt/* /var/www/html/pcs/6.0/
NOTE: This directory may be different depending on your web server configuration.
Copy the kernel and initrd image to the TFTP directory:
# mkdir –p /tftpboot/images/pcs/6.0 # cp /mnt/images/pxeboot/vmlinuz /tftpboot/images/pcs/6.0 # cp /mnt/images/pxebootinitrd.img /tftpboot/images/pcs/6.0
Restart the service to apply the changes:
# service xinetd restart # service dhcpd restart # service httpd restart
Add exceptions to the firewall to allow the TCP connection to ports 67, 68, 69, and 80, and to UDP ports 67, 68, and 69:
# iptables –A INPUT -m state --state NEW -m tcp --dport 67 -j ACCEPT # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 68 -j ACCEPT # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 69 -j ACCEPT # iptables -A INPUT -p udp -m state --state NEW -m udp --dport 67 -j ACCEPT # iptables -A INPUT -p udp -m state --state NEW -m udp --dport 68 -j ACCEPT # iptables -A INPUT -p udp -m state --state NEW -m udp --dport 69 -j ACCEPT # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
Create a kickstart file for the installer as per the Installing Parallels Cloud Server via PXE guide.
Examples of kickstart files:
Now it is possible to configure the target machine to boot from the network and start PXE installation.