Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 5. Using PXE to Provision Hosts
You can provision bare metal instances with Satellite using one of the following methods:
- Unattended Provisioning
- New hosts are identified by a MAC address and Satellite Server provisions the host using a PXE boot process.
- Unattended Provisioning with Discovery
- New hosts use PXE boot to load the Satellite Discovery service. This service identifies hardware information about the host and lists it as an available host to provision. For more information, see Chapter 7, Configuring the Discovery Service.
- PXE-less Provisioning
- New hosts are provisioned with a boot disk image that Satellite Server generates.
BIOS and UEFI Support
With Red Hat Satellite, you can perform both BIOS and UEFI based PXE provisioning. Both BIOS and UEFI interfaces work as interpreters between the computer’s operating system and firmware, initializing the hardware components and starting the operating system at boot time.
For information about supported workflows, see Supported architectures and provisioning scenarios.
In Satellite provisioning, the PXE loader option defines the DHCP filename
option to use during provisioning. For BIOS systems, use the PXELinux BIOS option to enable a provisioned node to download the pxelinux.0
file over TFTP. For UEFI systems, use the PXEGrub2 UEFI option to enable a TFTP client to download grub2/grubx64.efi
file, or use the PXEGrub2 UEFI HTTP option to enable an UEFI HTTP client to download grubx64.efi
from Capsule with the HTTP Boot feature.
For BIOS provisioning, you must associate a PXELinux template with the operating system. For UEFI provisioning, you must associate a PXEGrub2 template with the operating system. If you associate both PXELinux and PXEGrub2 templates, Satellite can deploy configuration files for both on a TFTP server, so that you can switch between PXE loaders easily.
5.1. Prerequisites for Bare Metal Provisioning
The requirements for bare metal provisioning include:
A Capsule Server managing the network for bare metal hosts. For unattended provisioning and discovery-based provisioning, Satellite Server requires PXE server settings.
For more information about networking requirements, see Chapter 3, Configuring Networking.
For more information about the Discovery service, Chapter 7, Configuring the Discovery Service.
- A bare metal host or a blank VM.
- You can use synchronized content repositories for Red Hat Enterprise Linux. For more information, see Syncing Repositories in Managing Content.
- Provide an activation key for host registration. For more information, see Creating An Activation Key in Managing Content.
For information about the security token for unattended and PXE-less provisioning, see Section 5.2, “Configuring the Security Token Validity Duration”.
5.2. Configuring the Security Token Validity Duration
When performing any kind of provisioning, as a security measure, Satellite automatically generates a unique token and adds this token to the kickstart URL in the PXE configuration file (PXELinux, Grub2). By default, the token is valid for 360 minutes. When you provision a host, ensure that you reboot the host within this time frame. If the token expires, it is no longer valid and you receive a 404 error and the operating system installer download fails.
Procedure
- In the Satellite web UI, navigate to Administer > Settings, and click the Provisioning tab.
-
Find the Token duration option and click the edit icon and edit the duration, or enter
0
to disable token generation. If token generation is disabled, an attacker can spoof client IP address and download kickstart from Satellite Server, including the encrypted root password.
5.3. Creating Hosts with Unattended Provisioning
Unattended provisioning is the simplest form of host provisioning. You enter the host details on Satellite Server and boot your host. Satellite Server automatically manages the PXE configuration, organizes networking services, and provides the operating system and configuration for the host.
This method of provisioning hosts uses minimal interaction during the process.
To use the CLI instead of the Satellite web UI, see the CLI procedure.
Procedure
- In the Satellite web UI, navigate to Hosts > Create Host.
- In the Name field, enter a name for the host.
- Optional: Click the Organization tab and change the organization context to match your requirement.
- Optional: Click the Location tab and change the location context to match your requirement.
- From the Host Group list, select a host group that you want to assign your host to. That host group will populate the form.
- Click the Interfaces tab, and on the interface of the host, click Edit.
Verify that the fields are populated with values. Note in particular:
- Satellite automatically assigns an IP address for the new host.
- In the MAC address field, enter a MAC address of the provisioning interface of the host. This ensures the identification of the host during the PXE boot process.
- The Name from the Host tab becomes the DNS name.
- Ensure that Satellite automatically selects the Managed, Primary, and Provision options for the first interface on the host. If not, select them.
- Click OK to save. To add another interface, click Add Interface. You can select only one interface for Provision and Primary.
- Click the Operating System tab, and verify that all fields contain values. Confirm each aspect of the operating system.
Optional: Click Resolve in Provisioning template to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Section 2.11, “Provisioning Templates”.
- Click the Parameters tab, and ensure that a parameter exists that provides an activation key. If not, add an activation key.
Click Submit to save the host details.
For more information about network interfaces, see Adding network interfaces.
This creates the host entry and the relevant provisioning settings. This also includes creating the necessary directories and files for PXE booting the bare metal host. If you start the physical host and set its boot mode to PXE, the host detects the DHCP service of Satellite Server’s integrated Capsule, receives HTTP endpoint of the Kickstart tree and installs the operating system.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Client 6 repository.
CLI procedure
Create the host with the
hammer host create
command:# hammer host create --name "My_Unattended_Host" --organization "My_Organization" \ --location "My_Location" --hostgroup "My_Host_Group" --mac "aa:aa:aa:aa:aa:aa" \ --build true --enabled true --managed true
Ensure the network interface options are set using the
hammer host interface update
command:# hammer host interface update --host "test1" --managed true \ --primary true --provision true
5.4. Creating Hosts with PXE-less Provisioning
Some hardware does not provide a PXE boot interface. In Satellite, you can provision a host without PXE boot. This is also known as PXE-less provisioning and involves generating a boot ISO that hosts can use. Using this ISO, the host can connect to Satellite Server, boot the installation media, and install the operating system.
Satellite also provides a PXE-less discovery service that operates without PXE-based services, such as DHCP and TFTP. For more information, see Section 7.7, “Implementing PXE-less Discovery”.
Boot ISO Types
There are the following types of boot ISOs:
- Full host image
- A boot ISO that contains the kernel and initial RAM disk image for the specific host. This image is useful if the host fails to chainload correctly. The provisioning template still downloads from Satellite Server.
- Subnet image
- A boot ISO that is not associated with a specific host. The ISO sends the host’s MAC address to Capsule Server, which matches it against the host entry. The image does not store IP address details and requires access to a DHCP server on the network to bootstrap. This image is generic to all hosts with a provisioning NIC on the same subnet. The image is based on iPXE boot firmware, only a limited number of network cards is supported.
The Full host image is based on SYSLINUX and Grub and works with most network cards. When using a Subnet image, see supported hardware on ipxe.org for a list of network card drivers expected to work with an iPXE-based boot disk.
Full host image contains a provisioning token, therefore the generated image has limited lifespan. For more information about configuring security tokens, read Section 5.2, “Configuring the Security Token Validity Duration”.
To use the CLI instead of the Satellite web UI, see the CLI procedure.
Procedure
- In the Satellite web UI, navigate to Hosts > Create Host.
- In the Name field, enter a name for the host.
- Optional: Click the Organization tab and change the organization context to match your requirement.
- Optional: Click the Location tab and change the location context to match your requirement.
- From the Host Group list, select a host group that you want to assign your host to. That host group will populate the form.
- Click the Interfaces tab, and on the interface of the host, click Edit.
Verify that the fields are populated with values. Note in particular:
- Satellite automatically assigns an IP address for the new host.
- In the MAC address field, enter a MAC address of the provisioning interface of the host. This ensures the identification of the host during the PXE boot process.
- The Name from the Host tab becomes the DNS name.
- Ensure that Satellite automatically selects the Managed, Primary, and Provision options for the first interface on the host. If not, select them.
- Click OK to save. To add another interface, click Add Interface. You can select only one interface for Provision and Primary.
- Click the Operating System tab, and verify that all fields contain values. Confirm each aspect of the operating system.
Click Resolve in Provisioning Templates to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Section 2.11, “Provisioning Templates”.
- Click the Parameters tab, and ensure that a parameter exists that provides an activation key. If not, add an activation key.
- Click Submit to save the host details. This creates a host entry and the host details page appears.
Download the boot disk from Satellite Server.
- For Full host image, on the host details page, click the vertical ellipsis and select Full host 'My_Host_Name' image.
- For Subnet image, navigate to Infrastructure > Subnets, click the dropdown menu in the Actions column of the required subnet and select Subnet generic image.
-
Write the ISO to a USB storage device using the
dd
utility orlivecd-tools
if required. When you start the host and boot from the ISO or the USB storage device, the host connects to Satellite Server and starts installing operating system from its kickstart tree.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Client 6 repository.
CLI procedure
Create the host using the
hammer host create
command.# hammer host create --name "My_Host_Name" --organization "My_Organization" \ --location "My_Location" --hostgroup "My_Host_Group" --mac "aa:aa:aa:aa:aa:aa" \ --build true --enabled true --managed true
Ensure that your network interface options are set using the
hammer host interface update
command.# hammer host interface update --host "My_Host_Name" --managed true \ --primary true --provision true
Download the boot disk from Satellite Server using the
hammer bootdisk
command:For Full host image:
# hammer bootdisk host --host My_Host_Name.example.com --full true
For Subnet image:
# hammer bootdisk subnet --subnet My_Subnet_Name
This creates a boot ISO for your host to use.
-
Write the ISO to a USB storage device using the
dd
utility orlivecd-tools
if required. When you start the physical host and boot from the ISO or the USB storage device, the host connects to Satellite Server and starts installing operating system from its kickstart tree.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Client 6 repository.
5.5. Creating Hosts with UEFI HTTP Boot Provisioning
You can provision hosts from Satellite using the UEFI HTTP Boot. This is the only method with which you can provision hosts in IPv6 network.
To use the CLI instead of the Satellite web UI, see the CLI procedure.
Prerequisites
- Ensure that you meet the requirements for HTTP booting. For more information, see HTTP Booting Requirements in Satellite Overview, Concepts, and Deployment Considerations.
Procedure
On Capsule that you use for provisioning, update the
grub2-efi
package to the latest version:# satellite-maintain packages update grub2-efi
Enable
foreman-proxy-http
,foreman-proxy-httpboot
, andforeman-proxy-tftp
features.# satellite-installer --scenario satellite \ --foreman-proxy-http true \ --foreman-proxy-httpboot true \ --foreman-proxy-tftp true
- Ensure that the Capsule has TFTP and HTTPBoot features recognized. In the Satellite web UI, navigate to Infrastructure > Capsules and click on Capsule to see the list of recognized features. Click Refresh Features if any of the features are missing.
- Ensure that Capsule is associated with the provisioning subnet. In the Satellite web UI, navigate to Infrastructure > Subnets > Edit Subnet > Capsules and select the Capsule for both TFTP and HTTPBoot options.
- Click OK to save.
- In the Satellite web UI, navigate to Hosts > Create Host.
- In the Name field, enter a name for the host.
- Optional: Click the Organization tab and change the organization context to match your requirement.
- Optional: Click the Location tab and change the location context to match your requirement.
- From the Host Group list, select a host group that you want to assign your host to. That host group will populate the form.
- Click the Interfaces tab, and on the interface of the host, click Edit.
Verify that the fields are populated with values. Note in particular:
- Satellite automatically assigns an IP address for the new host.
- In the MAC address field, enter a MAC address of the provisioning interface of the host. This ensures the identification of the host during the PXE boot process.
- The Name from the Host tab becomes the DNS name.
- Ensure that Satellite automatically selects the Managed, Primary, and Provision options for the first interface on the host. If not, select them.
- Click OK to save. To add another interface, click Add Interface. You can select only one interface for Provision and Primary.
- Click the Operating System tab, and verify that all fields contain values. Confirm each aspect of the operating system.
- From the PXE Loader list, select Grub2 UEFI HTTP.
Optional: Click Resolve in Provisioning template to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Section 2.13, “Creating Provisioning Templates”.
- Click the Parameters tab, and ensure that a parameter exists that provides an activation key. If not, add an activation key.
Click Submit to save the host details.
For more information about network interfaces, see Adding network interfaces.
- Set the host to boot in UEFI mode from network.
- Start the host.
- From the boot menu, select Kickstart default PXEGrub2.
This creates the host entry and the relevant provisioning settings. This also includes creating the necessary directories and files for UEFI booting the bare metal host. When you start the physical host and set its boot mode to UEFI HTTP, the host detects the defined DHCP service, receives HTTP endpoint of Capsule with the Kickstart tree and installs the operating system.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Client 6 repository.
CLI procedure
On Capsule that you use for provisioning, update the
grub2-efi
package to the latest version:# satellite-maintain packages update grub2-efi
Enable
foreman-proxy-http
,foreman-proxy-httpboot
, andforeman-proxy-tftp true
features:# satellite-installer --scenario satellite \ --foreman-proxy-http true \ --foreman-proxy-httpboot true \ --foreman-proxy-tftp true
Create the host with the
hammer host create
command.# hammer host create --name "My_Host" \ --build true \ --enabled true \ --hostgroup "My_Host_Group" \ --location "My_Location" \ --mac "aa:aa:aa:aa:aa:aa" \ --managed true \ --organization "My_Organization" \ --pxe-loader "Grub2 UEFI HTTP"
Ensure the network interface options are set using the
hammer host interface update
command:# hammer host interface update \ --host "My_Host" \ --managed true \ --primary true \ --provision true
- Set the host to boot in UEFI mode from network.
- Start the host.
- From the boot menu, select Kickstart default PXEGrub2.
This creates the host entry and the relevant provisioning settings. This also includes creating the necessary directories and files for UEFI booting the bare metal host. When you start the physical host and set its boot mode to UEFI HTTP, the host detects the defined DHCP service, receives HTTP endpoint of Capsule with the Kickstart tree and installs the operating system.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Client 6 repository.
5.6. Deploying SSH Keys During Provisioning
Use this procedure to deploy SSH keys added to a user during provisioning. For information on adding SSH keys to a user, see Managing SSH Keys for a User in Administering Red Hat Satellite.
Procedure
- In the Satellite web UI, navigate to Hosts > Provisioning Templates.
- Create a provisioning template, or clone and edit an existing template. For more information, see Section 2.13, “Creating Provisioning Templates”.
- In the template, click the Template tab.
In the Template editor field, add the
create_users
snippet to the%post
section:<%= snippet('create_users') %>
- Select the Default checkbox.
- Click the Association tab.
- From the Application Operating Systems list, select an operating system.
- Click Submit to save the provisioning template.
Create a host that is associated with the provisioning template or rebuild a host using the OS associated with the modified template. For more information, see Creating a Host in Managing Hosts.
The SSH keys of the Owned by user are added automatically when the
create_users
snippet is executed during the provisioning process. You can set Owned by to an individual user or a user group. If you set Owned by to a user group, the SSH keys of all users in the user group are added automatically.