Configuring iPXE to Reduce Provisioning Times
You can use orcharhino to configure PXELinux to chainboot iPXE in BIOS mode and boot using the HTTP protocol if you have the following restrictions that prevent you from using PXE:
-
A network with unmanaged DHCP servers.
-
A PXE service that is blacklisted on your network or restricted by a firewall.
-
An unreliable TFTP UDP-based protocol because of, for example, a low-bandwidth network.
Only BIOS systems are known to work reliably. For configuring iPXE with some EFI hosts, read a separate tutorial.
iPXE is an open source network boot firmware. It provides a full PXE implementation enhanced with additional features, including booting from HTTP server. For more information, see ipxe.org.
There are three methods of using iPXE with orcharhino:
-
Booting virtual machines using hypervisors that use iPXE as primary firmware.
-
Using PXELinux through TFTP to chainload iPXE directly on bare metal hosts.
-
Using PXELinux through UNDI, which uses HTTP to transfer the kernel and the initial RAM disk on bare-metal hosts.
The iPXE binary in SUSE Linux Enterprise Server is built without some security features. For this reason, you can only use HTTP, and cannot use HTTPS. Recompile iPXE from source to use security features like HTTPS.
-
A host exists on orcharhino to use.
-
The MAC address of the provisioning interface matches the host configuration.
-
The provisioning interface of the host has a valid DHCP reservation.
-
The NIC is capable of PXE booting. For more information, see supported hardware on ipxe.org for a list of hardware drivers expected to work with an iPXE-based boot disk.
-
The NIC is compatible with iPXE.
To prepare iPXE environment, you must perform this procedure on all orcharhino Proxies.
-
Enable the tftp and httpboot services:
# orcharhino-installer --foreman-proxy-httpboot true --foreman-proxy-tftp true
-
Install the
ipxe-bootimgs
package:# dnf install ipxe-bootimgs
-
Correct the SELinux file contexts:
# restorecon -RvF /var/lib/tftpboot/
-
Copy the iPXE firmware with the Linux kernel header to the TFTP directory:
# cp /usr/share/ipxe/ipxe.lkrn /var/lib/tftpboot/
-
Copy the UNDI iPXE firmware to the TFTP directory:
# cp /usr/share/ipxe/undionly.kpxe /var/lib/tftpboot/undionly-ipxe.0
-
-
Optionally, configure Foreman discovery. For more information, see Configuring the Discovery Service.
-
In the orcharhino management UI, navigate to Administer > Settings, and click the Provisioning tab.
-
Locate the Default PXE global template entry row and in the Value column, change the value to discovery.
-
Booting Virtual Machines
Some virtualization hypervisors use iPXE as primary firmware for PXE booting. Because of this, you can boot virtual machines without TFTP and PXELinux.
Using virtualization hypervisors removes the need for TFTP and PXELinux. It has the following workflow:
-
Virtual machine starts
-
iPXE retrieves the network credentials, including an HTTP URL, using DHCP
-
iPXE loads the iPXE bootstrap template from orcharhino Server or orcharhino Proxy
-
iPXE loads the iPXE template with MAC as a URL parameter from orcharhino Server or orcharhino Proxy
-
iPXE loads the kernel and initial RAM disk of the installer
-
Ensure that the hypervisor that you want to use supports iPXE. The following virtualization hypervisors support iPXE:
-
libvirt
-
oVirt
-
RHEV (deprecated)
-
VMWare (via custom firmware)
-
-
If you want to use orcharhino Proxies instead of your orcharhino Server, ensure that you have configured your orcharhino Proxies accordingly. For more information, see [configuring-orcharhino-proxy-for-host-registration-and-provisioning_provisioning].
You can use the default template to configure iPXE booting for hosts. If you want to change the default values in the template, clone the template and edit the clone.
-
In the orcharhino management UI, navigate to Hosts > Provisioning Templates, enter
Kickstart default iPXE
and click Search. -
Optional: If you want to change the template, click Clone, enter a unique name, and click Submit.
-
Click the name of the template you want to use.
-
If you clone the template, you can make changes you require on the Template tab.
-
Click the Association tab, and select the operating systems that your host uses.
-
Click the Locations tab, and add the location where the host resides.
-
Click the Organizations tab, and add the organization that the host belongs to.
-
Click Submit to save the changes.
-
In the orcharhino management UI, navigate to Hosts > Operating systems and select the operating system of your host.
-
Click the Templates tab.
-
From the iPXE Template list, select the template you want to use.
-
Click Submit to save the changes.
-
In the orcharhino management UI, navigate to Hosts > All Hosts.
-
In the Hosts page, select the host that you want to use.
-
Select the Operating System tab.
-
Set PXE Loader to iPXE Embedded.
-
Select the Templates tab.
-
From the iPXE template list, select Review to verify that the Kickstart default iPXE template is the correct template.
-
Set the HTTP URL.
-
If you want to use orcharhino Server for booting, run the following command on orcharhino Server:
# orcharhino-installer \ --foreman-proxy-dhcp-ipxefilename "http://orcharhino.example.com/unattended/iPXE?bootstrap=1"
-
If you want to use orcharhino Proxy for booting, run the following command on orcharhino Proxy:
# orcharhino-installer --foreman-proxy-dhcp-ipxe-bootstrap true
-
Chainbooting iPXE from PXELinux
Use this procedure to set up iPXE to use a built-in driver for network communication or UNDI interface.
To use HTTP with iPXE, use iPXE build with built-in drivers (ipxe.lkrn
).
Universal Network Device Interface (UNDI) is a minimalistic UDP/IP stack that implements TFTP client, however, cannot support other protocols like HTTP (undionly-ipxe.0
).
You can choose to either load ipxe.lkrn
or undionly-ipxe.0
file depending on the networking hardware capabilities and iPXE driver availability.
-
Host powers on
-
PXE driver retrieves the network credentials using DHCP
-
PXE driver retrieves the PXELinux firmware
pxelinux.0
using TFTP -
PXELinux searches for the configuration file on the TFTP server
-
PXELinux chainloads iPXE
ipxe.lkrn
orundionly-ipxe.0
-
iPXE retrieves the network credentials, including an HTTP URL, using DHCP again
-
iPXE chainloads the iPXE template from the template orcharhino Proxy
-
iPXE loads the kernel and initial RAM disk of the installer
-
If you want to use orcharhino Proxies instead of your orcharhino Server, ensure that you have configured your orcharhino Proxies accordingly. For more information, see [configuring-orcharhino-proxy-for-host-registration-and-provisioning_provisioning].
You can use the default template to configure iPXE booting for hosts. If you want to change the default values in the template, clone the template and edit the clone.
-
In the orcharhino management UI, navigate to Hosts > Provisioning Templates.
-
Enter
PXELinux chain iPXE
to useipxe.lkrn
or, for BIOS systems, enterPXELinux chain iPXE UNDI
to useundionly-ipxe.0
, and click Search. -
Optional: If you want to change the template, click Clone, enter a unique name, and click Submit.
-
Click the name of the template you want to use.
-
If you clone the template, you can make changes you require on the Template tab.
-
Click the Association tab, and select the operating systems that your host uses.
-
Click the Locations tab, and add the location where the host resides.
-
Click the Organizations tab, and add the organization that the host belongs to.
-
Click Submit to save the changes.
-
In the Provisioning Templates page, enter
Kickstart default iPXE
into the search field and click Search. -
Optional: If you want to change the template, click Clone, enter a unique name, and click Submit.
-
Click the name of the template you want to use.
-
If you clone the template, you can make changes you require on the Template tab.
-
Click the Association tab, and associate the template with the operating system that your host uses.
-
Click the Locations tab, and add the location where the host resides.
-
Click the Organizations tab, and add the organization that the host belongs to.
-
Click Submit to save the changes.
-
In the orcharhino management UI, navigate to Hosts > Operating systems and select the operating system of your host.
-
Click the Templates tab.
-
From the PXELinux template list, select the template you want to use.
-
From the iPXE template list, select the template you want to use.
-
Click Submit to save the changes.
-
In the orcharhino management UI, navigate to Configure > Host Groups, and select the host group you want to configure.
-
Select the Operating System tab.
-
Select the Architecture and Operating system.
-
Set PXE Loader to PXELinux BIOS to chainboot iPXE via PXELinux, or to iPXE Chain BIOS to load
undionly-ipxe.0
directly. -
Set the HTTP URL.
-
If you want to use orcharhino Server for booting, run the following command on orcharhino Server:
# orcharhino-installer \ --foreman-proxy-dhcp-ipxefilename "http://orcharhino.example.com/unattended/iPXE?bootstrap=1"
-
If you want to use orcharhino Proxy for booting, run the following command on orcharhino Proxy:
# orcharhino-installer --foreman-proxy-dhcp-ipxe-bootstrap true
-
The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution–Share Alike 3.0 Unported ("CC-BY-SA") license. This page also contains text from the official Foreman documentation which uses the same license ("CC-BY-SA"). |