Chapter 2. Administering Hosts
This chapter describes creating, registering, administering, and removing hosts.
2.1. Creating a Host in Red Hat Satellite
Use this procedure to create a host in Red Hat Satellite. To use the CLI instead of the Satellite web UI, see the CLI procedure.
Procedure
- In the Satellite web UI, click Hosts > Create Host.
- On the Host tab, enter the required details.
- Click the Ansible Roles tab, and from the Ansible Roles list, select one or more roles that you want to add to the host. Use the arrow icon to manage the roles that you add or remove.
- On the Puppet Classes tab, select the Puppet classes you want to include.
On the Interfaces tab:
For each interface, click Edit in the Actions column and configure the following settings as required:
- Type — For a Bond or BMC interface, use the Type list and select the interface type.
- MAC address — Enter the MAC address.
- DNS name — Enter the DNS name that is known to the DNS server. This is used for the host part of the FQDN.
- Domain — Select the domain name of the provisioning network. This automatically updates the Subnet list with a selection of suitable subnets.
- IPv4 Subnet — Select an IPv4 subnet for the host from the list.
- IPv6 Subnet — Select an IPv6 subnet for the host from the list.
- IPv4 address — If IP address management (IPAM) is enabled for the subnet, the IP address is automatically suggested. Alternatively, you can enter an address. The address can be omitted if provisioning tokens are enabled, if the domain does not manage DNS, if the subnet does not manage reverse DNS, or if the subnet does not manage DHCP reservations.
- IPv6 address — If IP address management (IPAM) is enabled for the subnet, the IP address is automatically suggested. Alternatively, you can enter an address.
- Managed — Select this checkbox to configure the interface during provisioning to use the Capsule provided DHCP and DNS services.
- Primary — Select this checkbox to use the DNS name from this interface as the host portion of the FQDN.
-
Provision — Select this checkbox to use this interface for provisioning. This means TFTP boot will take place using this interface, or in case of image based provisioning, the script to complete the provisioning will be executed through this interface. Note that many provisioning tasks, such as downloading packages by anaconda or Puppet setup in a
%post
script, will use the primary interface. Virtual NIC — Select this checkbox if this interface is not a physical device. This setting has two options:
- Tag — Optionally set a VLAN tag. If unset, the tag will be the VLAN ID of the subnet.
- Attached to — Enter the device name of the interface this virtual interface is attached to.
- Click OK to save the interface configuration.
- Optionally, click Add Interface to include an additional network interface. For more information, see Chapter 5, Adding Network Interfaces.
- Click Submit to apply the changes and exit.
- On the Operating System tab, enter the required details. For Red Hat operating systems, select Synced Content for Media Selection. If you want to use non Red Hat operating systems, select All Media, then select the installation media from the Media Selection list. You can select a partition table from the list or enter a custom partition table in the Custom partition table field. You cannot specify both.
On the Parameters tab, click Add Parameter to add any parameter variables that you want to pass to job templates at run time. This includes all Puppet Class, Ansible playbook parameters and host parameters that you want to associate with the host. To use a parameter variable with an Ansible job template, you must add a Host Parameter.
When you create a Red Hat Enterprise Linux 8 host, you can set system purpose attributes. System purpose attributes define what subscriptions to attach automatically on host creation. In the Host Parameters area, enter the following parameter names with the corresponding values. For the list of values, see Introduction to System Purpose in Performing a standard RHEL 8 installation.
-
syspurpose_role
-
syspurpose_sla
-
syspurpose_usage
-
syspurpose_addons
If you want to create a host with pull mode for remote job execution, add the
enable-remote-execution-pull
parameter with typeboolean
set totrue
. For more information, see Section 12.4, “Transport Modes for Remote Execution”.-
- On the Additional Information tab, enter additional information about the host.
- Click Submit to complete your provisioning request.
CLI procedure
To create a host associated to a host group, enter the following command:
# hammer host create \ --ask-root-password yes \ --hostgroup "My_Host_Group" \ --interface="primary=true, \ provision=true, \ mac=My_MAC_Address, \ ip=My_IP_Address" \ --location "My_Location" \ --name "My_Host_Name" \ --organization "My_Organization"
This command prompts you to specify the root password. It is required to specify the host’s IP and MAC address. Other properties of the primary network interface can be inherited from the host group or set using the
--subnet
, and--domain
parameters. You can set additional interfaces using the--interface
option, which accepts a list of key-value pairs. For the list of available interface settings, enter thehammer host create --help
command.
2.2. Cloning Hosts
You can clone existing hosts.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- In the Actions menu, click Clone.
- On the Host tab, ensure to provide a Name different from the original host.
- On the Interfaces tab, ensure to provide a different IP address.
- Click Submit to clone the host.
For more information, see Section 2.1, “Creating a Host in Red Hat Satellite”.
2.3. Associating A Virtual Machine with Satellite from a Hypervisor
Procedure
- In the Satellite web UI, navigate to Infrastructure > Compute Resources.
- Select a compute resource.
- On the Virtual Machines tab, click Associate VM from the Actions menu.
2.4. Editing the System Purpose of a Host
You can edit the system purpose attributes for a Red Hat Enterprise Linux host. System purpose allows you to set the intended use of a system on your network and improves reporting accuracy in the Subscriptions service of the Red Hat Hybrid Cloud Console. For more information about system purpose, see Introduction to System Purpose in Performing a standard RHEL 8 installation.
Prerequisites
- The host that you want to edit must be registered with the subscription-manager.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- On the Overview tab, click Edit on the System purpose card.
- Select the system purpose attributes for your host.
- Click Save.
CLI procedure
Log in to the host and edit the required system purpose attributes. For example, set the usage type to
Production
, the role toRed Hat Enterprise Linux Server
, and add theaddon
add on. For the list of values, see Introduction to System Purpose in Performing a standard RHEL 8 installation.# subscription-manager syspurpose set usage 'Production' # subscription-manager syspurpose set role 'Red Hat Enterprise Linux Server' # subscription-manager syspurpose add addons 'your_addon'
Verify the system purpose attributes for this host:
# subscription-manager syspurpose
Automatically attach subscriptions to this host:
# subscription-manager attach --auto
Verify the system purpose status for this host:
# subscription-manager status
2.5. Editing the System Purpose of Multiple Hosts
You can edit the system purpose attributes of Red Hat Enterprise Linux hosts. System purpose attributes define which subscriptions to attach automatically to hosts. For more information about system purpose, see Introduction to System Purpose in Performing a standard RHEL 8 installation.
Prerequisites
- The hosts that you want to edit must be registered with the subscription-manager.
Procedure
- In the Satellite web UI, navigate to Hosts > Content Hosts and select Red Hat Enterprise Linux 8 hosts that you want to edit.
- Click the Select Action list and select Manage System Purpose.
Select the system purpose attributes that you want to assign to the selected hosts. You can select one of the following values:
- A specific attribute to set an all selected hosts.
- No Change to keep the attribute set on the selected hosts.
- None (Clear) to clear the attribute on the selected hosts.
- Click Assign.
- In the Satellite web UI, navigate to Hosts > Content Hosts and select the same Red Hat Enterprise Linux 8 hosts to automatically attach subscriptions based on the system purpose.
- Click the Select Action list and select Manage Subscriptions.
- Click Auto-Attach to attach subscriptions to all selected hosts automatically based on their system role.
2.6. Changing a Module Stream for a Host
If you have a host running Red Hat Enterprise Linux 8, you can modify the module stream for the repositories you install.
You can enable, disable, install, update, and remove module streams from your host in the Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- Click the Content tab, then click the Module streams tab.
- Click the vertical ellipsis next to the module and select the action you want to perform. You get a REX job notification once the remote execution job is complete.
2.7. Enabling Custom Repositories on Content Hosts
As a Simple Content Access (SCA) user, you can enable all custom repositories on content hosts using the Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts and select a host.
- Select the Content tab, then select Repository sets.
- From the dropdown, you can filter the Repository type column to Custom.
- Select the desired number of repositories or click the Select All checkbox to select all repositories, then click the vertical ellipsis, and select Override to Enabled.
2.8. Creating a Host Group
If you create a high volume of hosts, many of the hosts can have common settings and attributes. Adding these settings and attributes for every new host is time consuming. If you use host groups, you can apply common attributes to hosts that you create.
A host group functions as a template for common host settings, containing many of the same details that you provide to hosts. When you create a host with a host group, the host inherits the defined settings from the host group. You can then provide additional details to individualize the host.
To use the CLI instead of the Satellite web UI, see the CLI procedure.
Host Group Hierarchy
You can create a hierarchy of host groups. Aim to have one base level host group that represents all hosts in your organization and provide general settings, and then nested groups to provide specific settings. For example, you can have a base level host group that defines the operating system, and two nested host groups that inherit the base level host group:
Hostgroup:
Base
(Red Hat Enterprise Linux 8.8)Hostgroup:
Webserver
(applies thenginx
Puppet class)-
Host:
webserver1.example.com
(web server) -
Host:
webserver2.example.com
(web server)
-
Host:
Hostgroup:
Storage
(applies thenfs
Puppet class)-
Host:
storage1.example.com
(storage server) -
Host:
storage2.example.com
(storage server)
-
Host:
-
Host:
custom.example.com
(custom host)
In this example, all hosts use Red Hat Enterprise Linux 7.6 as their operating system because of their inheritance of the Base
host group. The two web server hosts inherit the settings from the Webserver
host group, which includes the nginx
Puppet class and the settings from the Base
host group. The two storage servers inherit the settings from the Storage
host group, which includes the nfs
Puppet class and the settings from the Base
host group. The custom host only inherits the settings from the Base
host group.
Procedure
- In the Satellite web UI, navigate to Configure > Host Groups and click Create Host Group.
- If you have an existing host group that you want to inherit attributes from, you can select a host group from the Parent list. If you do not, leave this field blank.
- Enter a Name for the new host group.
- Enter any further information that you want future hosts to inherit.
- Click the Ansible Roles tab, and from the Ansible Roles list, select one or more roles that you want to add to the host. Use the arrow icon to manage the roles that you add or remove.
Click the additional tabs and add any details that you want to attribute to the host group.
NotePuppet fails to retrieve the Puppet CA certificate while registering a host with a host group associated with a Puppet environment created inside a
Production
environment.To create a suitable Puppet environment to be associated with a host group, manually create a directory:
# mkdir /etc/puppetlabs/code/environments/example_environment
- Click Submit to save the host group.
CLI procedure
Create the host group with the
hammer hostgroup create
command. For example:# hammer hostgroup create --name "Base" \ --architecture "My_Architecture" \ --content-source-id _My_Content_Source_ID_ \ --content-view "_My_Content_View_" \ --domain "_My_Domain_" \ --lifecycle-environment "_My_Lifecycle_Environment_" \ --locations "_My_Location_" \ --medium-id _My_Installation_Medium_ID_ \ --operatingsystem "_My_Operating_System_" \ --organizations "_My_Organization_" \ --partition-table "_My_Partition_Table_" \ --puppet-ca-proxy-id _My_Puppet_CA_Proxy_ID_ \ --puppet-environment "_My_Puppet_Environment_" \ --puppet-proxy-id _My_Puppet_Proxy_ID_ \ --root-pass "My_Password" \ --subnet "_My_Subnet_"
2.9. Creating a Host Group for Each Lifecycle Environment
Use this procedure to create a host group for the Library lifecycle environment and add nested host groups for other lifecycle environments.
Procedure
To create a host group for each lifecycle environment, run the following Bash script:
MAJOR="My_Major_OS_Version" ARCH="My_Architecture" ORG="My_Organization" LOCATIONS="My_Location" PTABLE_NAME="My_Partition_Table" DOMAIN="My_Domain" hammer --output csv --no-headers lifecycle-environment list --organization "${ORG}" | cut -d ',' -f 2 | while read LC_ENV; do [[ ${LC_ENV} == "Library" ]] && continue hammer hostgroup create --name "rhel-${MAJOR}server-${ARCH}-${LC_ENV}" \ --architecture "${ARCH}" \ --partition-table "${PTABLE_NAME}" \ --domain "${DOMAIN}" \ --organizations "${ORG}" \ --query-organization "${ORG}" \ --locations "${LOCATIONS}" \ --lifecycle-environment "${LC_ENV}" done
2.10. Adding a Host to a Host Group
You can add a host to a host group in the Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- Click Edit.
- Select the host group from the Host Group list.
- Click Submit.
Verification
- The Details card under the Overview tab now shows the host group your host belongs to.
2.11. Changing the Host Group of a Host
Use this procedure to change the Host Group of a host.
If you reprovision a host after changing the host group, the fresh values that the host inherits from the host group will be applied.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- Click Edit.
- Select the new host group from the Host Group list.
- Click Submit.
Verification
- The Details card under the Overview tab now shows the host group your host belongs to.
2.12. Adding a Host to a Host Collection
You can add a host to a host collection in the Satellite web UI.
Prerequisites
A host must be registered to Red Hat Satellite to add it to a Host Collection. For more information about registering hosts, see Section 3.3, “Registering Hosts by Using Global Registration”.
Note that if you add a host to a host collection, the Satellite auditing system does not log the change.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- In the Host collections card, click the vertical ellipsis and select Add host to collections.
- Select the host collection.
- Click Add.
CLI procedure
To add a host to a host collection, enter the following command:
# hammer host-collection add-host \ --host-ids My_Host_ID_1 \ --id My_Host_Collection_ID
2.13. Using the Host Details Tab
In Satellite, you can view details of a host name in the Details tab. You can expand and collapse individual cards and all links. Your browser remembers the card expansion and collapse state.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to view.
- Select the Details tab.
The cards in the Details tab show details for the System properties, BIOS, Networking interfaces, Operating system, Provisioning templates, and Provisioning. Registered content hosts show additional cards for Registration details, Installed products, and HW properties providing information about Model, Number of CPU(s), Sockets, Cores per socket and RAM.
In the Operating system card, you can see details for the Architecture, OS, Boot time, and Kernel release.
There are interactive features for the following Details cards:
Networking interfaces
- Click to collapse and expand each network interface.
- Click the link to edit all network interfaces.
System properties
- Click to copy values to clipboard including Name, Subscription UUID, and Domain.
- For hosts with virtual guests, click the chip to see the list of guests.
- For hosts that are virtual guests, click the Virtual host link to view its host.
Provisioning templates
- Click to view a template in a pop-up modal without leaving the page.
- Click the pencil icon to edit a template.
- Click the pop-out button in modal to view the template in a new tab.
- Click the link in modal to edit the template.
- Click the Copy to clipboard button in modal to get the template into clipboard.
2.14. Changing the Content Source of a Host
A content source is a Capsule that a host consumes content from. Use this procedure to change the content source for a host.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- Click the vertical ellipsis icon next to the Edit button and select Change content source.
- Select Content Source, Lifecycle Content View, and Content Source from the lists.
Click Change content source.
NoteSome lifecycle environments can be unavailable for selection if they are not synced on the selected content source. For more information, see Adding Lifecycle Environments to Capsule Servers in Managing Content.
You can either complete the content source change using remote execution or manually. To update configuration on host using remote execution, click Run job invocation. For more information about running remote execution jobs, see Configuring and Setting up Remote Jobs. To update the content source manually, execute the autogenerated commands from Change content source on the host.
2.15. Changing the Environment of a Host
Use this procedure to change the environment of a host.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- Click the vertical ellipsis in the Content view details card and select Edit content view assignment.
- Select the environment.
- Select the content view.
- Click Save.
2.16. Changing the Managed Status of a Host
Hosts provisioned by Satellite are Managed by default. When a host is set to Managed, you can configure additional host parameters from Satellite Server. These additional parameters are listed on the Operating System tab. If you change any settings on the Operating System tab, they will not take effect until you set the host to build and reboot it.
If you need to obtain reports about configuration management on systems using an operating system not supported by Satellite, set the host to Unmanaged.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- Click Edit.
- Click Manage host or Unmanage host to change the host’s status.
- Click Submit.
2.17. Enabling Tracer on a Host
Use this procedure to enable Tracer on Satellite and access Traces. Tracer displays a list of services and applications that need to be restarted. Traces is the output generated by Tracer in the Satellite web UI.
Prerequisites
- Red Hat Satellite Client 6 repository for the operating system version of the host is synchronized on Satellite Server, available in the content view and the lifecycle environment of the host, and enabled for the host. For more information, see Changing the repository sets status for a host in Satellite in Managing Content.
- Remote execution is enabled.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the host you want to modify.
- On the Traces tab, click Enable Traces.
-
Select the provider to install
katello-host-tools-tracer
from the list. - Click Enable Tracer. You get a REX job notification after the remote execution job is complete.
2.18. Restarting Applications on a Host
Use this procedure to restart applications from the Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click the name of the hosts you want to modify.
- Select the Traces tab.
- Select applications that you want to restart.
- Select Restart via remote execution from the Restart app list. You will get a REX job notification once the remote execution job is complete.
2.19. Assigning a Host to a Specific Organization
Use this procedure to assign a host to a specific organization. For general information about organizations and how to configure them, see Managing Organizations in Administering Red Hat Satellite.
If your host is already registered with a different organization, you must first unregister the host before assigning it to a new organization. To unregister the host, run subscription-manager unregister
on the host. After you assign the host to a new organization, you can re-register the host.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Select the checkbox of the host you want to change.
- From the Select Action list, select Assign Organization. A new option window opens.
From the Select Organization list, select the organization that you want to assign your host to. Select the checkbox Fix Organization on Mismatch.
NoteA mismatch happens if there is a resource associated with a host, such as a domain or subnet, and at the same time not associated with the organization you want to assign the host to. The option Fix Organization on Mismatch will add such a resource to the organization, and is therefore the recommended choice. The option Fail on Mismatch will always result in an error message. For example, reassigning a host from one organization to another will fail, even if there is no actual mismatch in settings.
- Click Submit.
2.20. Assigning a Host to a Specific Location
Use this procedure to assign a host to a specific location. For general information about locations and how to configure them, see Creating a Location in Managing Content.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Select the checkbox of the host you want to change.
- From the Select Action list, select Assign Location. A new option window opens.
Navigate to the Select Location list and choose the location that you want for your host. Select the checkbox Fix Location on Mismatch.
NoteA mismatch happens if there is a resource associated with a host, such as a domain or subnet, and at the same time not associated with the location you want to assign the host to. The option Fix Location on Mismatch will add such a resource to the location, and is therefore the recommended choice. The option Fail on Mismatch will always result in an error message. For example, reassigning a host from one location to another will fail, even if there is no actual mismatch in settings.
- Click Submit.
2.21. Switching between Hosts
When you are on a particular host in the Satellite web UI, you can navigate between hosts without leaving the page by using the host switcher. Click ⇄ next to the hostname. This displays a list of hosts in alphabetical order with a pagination arrow and a search bar to find the host you are looking for.
2.22. Viewing Host Details from a Content Host
Use this procedure to view the host details page from a content host.
Procedure
- In the Satellite web UI, navigate to Hosts > Content Hosts
- Click the content host you want to view.
- Select the Details tab to see the host details page.
The cards in the Details tab show details for the System properties, BIOS, Networking interfaces, Operating system, Provisioning templates, and Provisioning. Registered content hosts show additional cards for Registration details, Installed products, and HW properties providing information about Model, Number of CPU(s), Sockets, Cores per socket, and RAM.
2.23. Selecting Host Columns
You can select what columns you want to see in the host table on the Hosts > All Hosts page. For a complete list of host columns, see Appendix C, Overview of the Host Columns.
It is not possible to deselect the Name column. The Name column serves as a primary identification method of the host.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Click Manage columns.
Select columns that you want to display. You can select individual columns or column categories. Selecting or deselecting a category selects or deselects all columns in that category.
NoteSome columns are included in more than one category, but you can display a column of a specific type only once. By selecting or deselecting a specific column, you select or deselect all instances of that column.
Verification
- You can now see the selected columns in the host table.
2.24. Removing a Host from Satellite
Use this procedure to remove a host from Satellite. To use the CLI instead of the Satellite web UI, see the CLI procedure.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts or Hosts > Content Hosts. Note that there is no difference from what page you remove a host, from All Hosts or Content Hosts. In both cases, Satellite removes a host completely.
- Select the hosts that you want to remove.
- From the Select Action list, select Delete Hosts.
- Click Submit to remove the host from Satellite permanently.
By default, the Destroy associated VM on host delete
setting is set to no
. If a host record that is associated with a virtual machine is deleted, the virtual machine will remain on the compute resource.
To delete a virtual machine on the compute resource, navigate to Administer > Settings and select the Provisioning tab. Setting Destroy associated VM on host delete
to yes
deletes the virtual machine if the host record that is associated with the virtual machine is deleted. To avoid deleting the virtual machine in this situation, disassociate the virtual machine from Satellite without removing it from the compute resource or change the setting.
CLI procedure
Delete your host from Satellite:
$ hammer host delete \ --id My_Host_ID \ --location-id My_Location_ID \ --organization-id My_Organization_ID
Alternatively, you can use
--name My_Host_Name
instead of--id My_Host_ID
.
2.24.1. Disassociating A Virtual Machine from Satellite without Removing It from a Hypervisor
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Select the checkbox to the left of the hosts that you want to disassociate.
- From the Select Action list, click Disassociate Hosts.
- Optional: Select the checkbox to keep the hosts for future action.
- Click Submit.