Using iPXE to reduce provisioning times

iPXE is an open-source network-boot firmware. It provides a full PXE implementation enhanced with additional features, such as booting from an HTTP server. For more information about iPXE, see iPXE website.

You can use iPXE if the following restrictions prevent you from using PXE:

  • A network with unmanaged DHCP servers.

  • A PXE service that is unreachable because of, for example, a firewall restriction.

  • A TFTP UDP-based protocol that is unreliable because of, for example, a low-bandwidth network.

Prerequisites for using iPXE

You can use iPXE to boot virtual machines in the following cases:

  • Your virtual machines run on a hypervisor that uses iPXE as primary firmware.

  • Your virtual machines are in BIOS mode. In this case, you can configure PXELinux to chainboot iPXE and boot by using the HTTP protocol.

For booting virtual machines in UEFI mode by using HTTP, you can follow Creating Hosts with UEFI HTTP Boot Provisioning instead.

Supportability

ATIX AG does not officially support iPXE in orcharhino.

Host requirements
  • 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.

Configuring iPXE environment

Configure an iPXE environment on all orcharhino Proxies that you want to use for iPXE provisioning.

In AlmaLinux, security-related features of iPXE are not supported and the iPXE binary is built without security features. For this reason, you can only use HTTP but not HTTPS. You can recompile iPXE from source to use security features such as HTTPS.

Prerequisites
Procedure
  1. Enable the TFTP and HTTPboot services on your orcharhino Proxy:

    # orcharhino-installer \
    --foreman-proxy-httpboot true \
    --foreman-proxy-tftp true
  2. Install the ipxe-bootimgs package on your orcharhino Proxy:

    # dnf install ipxe-bootimgs
  3. Copy iPXE firmware to the TFTP directory.

    • Copy the iPXE firmware with the Linux kernel header:

      # cp /usr/share/ipxe/ipxe.lkrn /var/lib/tftpboot/
    • Copy the UNDI iPXE firmware:

      # cp /usr/share/ipxe/undionly.kpxe /var/lib/tftpboot/undionly-ipxe.0
  4. Correct the SELinux file contexts:

    # restorecon -RvF /var/lib/tftpboot/
  5. 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

Booting virtual machines

Some virtualization hypervisors use iPXE as primary firmware for PXE booting. If you use such a hypervisor, you can boot virtual machines without TFTP and PXELinux.

Booting a virtual machine has the following workflow:

  1. Virtual machine starts.

  2. iPXE retrieves the network credentials, including an HTTP URL, by using DHCP.

  3. iPXE loads the iPXE bootstrap template from orcharhino Proxy.

  4. iPXE loads the iPXE template with MAC as a URL parameter from orcharhino Proxy.

  5. iPXE loads the kernel and initial RAM disk of the installer.

Prerequisites
  • Your hypervisor must support iPXE. The following virtualization hypervisors support iPXE:

  • You have configured your iPXE environment. For more information, see Configuring iPXE Environment.

You can use the original templates shipped in orcharhino as described below. If you require modification to an original template, clone the template, edit the clone, and associate the clone instead of the original template. For more information, see cloning provisioning templates.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > Templates > Provisioning Templates.

  2. Search for the required template:

    • The AutoYaST default iPXE template for SUSE Linux Enterprise Server hosts.

    • The Kickstart default iPXE template for AlmaLinux hosts.

    • The Preseed default iPXE template for Debian/Ubuntu hosts.

  3. Click the name of the template.

  4. Click the Association tab and select the operating systems that your host uses.

  5. Click the Locations tab and add the location where the host resides.

  6. Click the Organizations tab and add the organization that the host belongs to.

  7. Click Submit to save the changes.

  8. In the orcharhino management UI, navigate to Hosts > Operating systems and select the operating system of your host.

  9. Click the Templates tab.

  10. From the iPXE template list, select the required template:

    • The AutoYaST default iPXE template for SUSE Linux Enterprise Server hosts.

    • The Kickstart default iPXE template for AlmaLinux hosts.

    • The Preseed default iPXE template for Debian/Ubuntu hosts.

  11. Click Submit to save the changes.

  12. In the orcharhino management UI, navigate to Hosts > All Hosts.

  13. In the Hosts page, select the host that you want to use.

  14. Select the Operating System tab.

  15. Set PXE Loader to iPXE Embedded.

  16. Select the Templates tab.

  17. In Provisioning Templates, click Resolve and verify that the iPXE template resolves to the required template.

  18. Click Submit to save host settings.

Chainbooting iPXE from PXELinux

You can set up iPXE to use a built-in driver for network communication (ipxe.lkrn) or Universal Network Device Interface (UNDI) (undionly-ipxe.0). You can choose to load either file depending on the networking hardware capabilities and iPXE driver availability.

UNDI is a minimalistic UDP/IP stack that implements TFTP client. However, UNDI cannot support other protocols like HTTP. To use HTTP with iPXE, use the iPXE build with built-in drivers (ipxe.lkrn).

Chainbooting iPXE has the following workflow:

  1. Host powers on.

  2. PXE driver retrieves the network credentials by using DHCP.

  3. PXE driver retrieves the PXELinux firmware pxelinux.0 by using TFTP.

  4. PXELinux searches for the configuration file on the TFTP server.

  5. PXELinux chainloads iPXE ipxe.lkrn or undionly-ipxe.0.

  6. iPXE retrieves the network credentials, including an HTTP URL, by using DHCP again.

  7. iPXE chainloads the iPXE template from your Templates orcharhino Proxy.

  8. iPXE loads the kernel and initial RAM disk of the installer.

Prerequisites

You can use the original templates shipped in orcharhino as described below. If you require modification to an original template, clone the template, edit the clone, and associate the clone instead of the original template. For more information, see cloning provisioning templates.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > Templates > Provisioning Templates.

  2. Search for the required PXELinux template:

    • PXELinux chain iPXE to use ipxe.lkrn

    • PXELinux chain iPXE UNDI to use undionly-ipxe.0

  3. Click the name of the template you want to use.

  4. Click the Association tab and select the operating systems that your host uses.

  5. Click the Locations tab and add the location where the host resides.

  6. Click the Organizations tab and add the organization that the host belongs to.

  7. Click Submit to save the changes.

  8. On the Provisioning Templates page, search for the required template:

    • The AutoYaST default iPXE template for SUSE Linux Enterprise Server hosts.

    • The Kickstart default iPXE template for AlmaLinux hosts.

    • The Preseed default iPXE template for Debian/Ubuntu hosts.

  9. Click the name of the template.

  10. Click the Association tab and associate the template with the operating system that your host uses.

  11. Click the Locations tab and add the location where the host resides.

  12. Click the Organizations tab and add the organization that the host belongs to.

  13. Click Submit to save the changes.

  14. In the orcharhino management UI, navigate to Hosts > Operating systems and select the operating system of your host.

  15. Click the Templates tab.

  16. From the PXELinux template list, select the template you want to use.

  17. From the iPXE template list, select the required template:

    • The AutoYaST default iPXE template for SUSE Linux Enterprise Server hosts.

    • The Kickstart default iPXE template for AlmaLinux hosts.

    • The Preseed default iPXE template for Debian/Ubuntu hosts.

  18. Click Submit to save the changes.

  19. In the orcharhino management UI, navigate to Configure > Host Groups, and select the host group you want to configure.

  20. Select the Operating System tab.

  21. Select the Architecture and Operating system.

  22. Set the PXE Loader:

    • Select PXELinux BIOS to chainboot iPXE (ipxe.lkrn) from PXELinux.

    • Select iPXE Chain BIOS to load undionly-ipxe.0 directly.

The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution Share Alike 4.0 International ("CC BY-SA 4.0") license. This page also contains text from the official Foreman documentation which uses the same license ("CC BY-SA 4.0").