Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 6. 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.

6.1. 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 Section 5.5, “Creating hosts with UEFI HTTP boot provisioning” instead.

Supportability

Red Hat does not officially support iPXE in Red Hat Satellite. For more information, see Supported architectures and kickstart scenarios in Satellite 6 in the Red Hat Knowledgebase.

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.

6.2. Configuring iPXE environment

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

Important

In Red Hat Enterprise Linux, 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. For more information, see Red Hat Enterprise Linux HTTPS support in iPXE.

Prerequisites

Procedure

  1. Enable the TFTP and HTTPboot services on your Capsule:

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

    # satellite-maintain packages 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 Satellite Server for booting, run the following command on Satellite Server:

      # satellite-installer \
      --foreman-proxy-dhcp-ipxefilename "http://satellite.example.com/unattended/iPXE?bootstrap=1"
    • If you want to use Capsule Server for booting, run the following command on Capsule Server:

      # satellite-installer --foreman-proxy-dhcp-ipxe-bootstrap true

6.3. 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 Capsule.
  4. iPXE loads the iPXE template with MAC as a URL parameter from Capsule.
  5. iPXE loads the kernel and initial RAM disk of the installer.

Prerequisites

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

    • libvirt
    • Red Hat Virtualization (deprecated)
  • You have configured your iPXE environment. For more information, see Section 6.2, “Configuring iPXE environment”.
Note

You can use the original templates shipped in Satellite 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 Section 2.14, “Cloning provisioning templates”.

Procedure

  1. In the Satellite web UI, navigate to Hosts > Templates > Provisioning Templates.
  2. Search for the Kickstart default iPXE template.
  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 Satellite web 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 Kickstart default iPXE template.
  11. Click Submit to save the changes.
  12. In the Satellite web 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.

6.4. 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 Capsule.
  8. iPXE loads the kernel and initial RAM disk of the installer.

Prerequisites

Note

You can use the original templates shipped in Satellite 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 Section 2.14, “Cloning provisioning templates”.

Procedure

  1. In the Satellite web 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 Kickstart default iPXE template.
  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 Satellite web 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 Kickstart default iPXE template.
  18. Click Submit to save the changes.
  19. In the Satellite web 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.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.