A.6. Manually Updating Hosts

Caution

This information is provided for advanced system administrators who need to update hosts manually, but Red Hat does not support this method. The procedure described in this topic does not include important steps, including certificate renewal, assuming advanced knowledge of such information. Red Hat supports updating hosts using the Administration Portal. For details, see Updating individual hosts or Updating all hosts in a cluster in the Administration Guide.

You can use the dnf command to update your hosts. Update your systems regularly, to ensure timely application of security and bug fixes.

Limitations

  • On RHVH, the update only preserves modified content in the /etc and /var directories. Modified data in other paths is overwritten during an update.
  • If the cluster has migration enabled, virtual machines are automatically migrated to another host in the cluster. Update a host when its usage is relatively low.
  • In a self-hosted engine environment, the Manager virtual machine can only migrate between self-hosted engine nodes in the same cluster. It cannot migrate to standard hosts.
  • The cluster must have sufficient memory reserved for its hosts to perform maintenance. Otherwise, virtual machine migrations will hang and fail. You can reduce the memory usage of host updates by shutting down some or all virtual machines before updating hosts.
  • Do not update all hosts at the same time, as one host must remain available to perform Storage Pool Manager (SPM) tasks.
  • You cannot migrate a pinned virtual machine (such as a virtual machine using a vGPU) to another host. Pinned virtual machines must be shut down before updating the host.

Procedure

  1. Ensure the correct repositories are enabled. You can check which repositories are currently enabled by running dnf repolist.

    • For Red Hat Virtualization Hosts:

      # subscription-manager repos --enable=rhvh-4-for-rhel-8-x86_64-rpms
    • For Red Hat Enterprise Linux hosts:

      # subscription-manager repos \
          --enable=rhel-8-for-x86_64-baseos-rpms \
          --enable=rhel-8-for-x86_64-appstream-rpms \
          --enable=rhv-4-mgmt-agent-for-rhel-8-x86_64-rpms \
          --enable=advanced-virt-for-rhel-8-x86_64-rpms \
          --enable=fast-datapath-for-rhel-8-x86_64-rpms
  2. In the Administration Portal, click ComputeHosts and select the host to be updated.
  3. Click ManagementMaintenance and OK.
  4. For Red Hat Enterprise Linux hosts:

    1. Identify the current version of Red Hat Enterprise Linux:

      # cat /etc/redhat-release
    2. Check which version of the redhat-release package is available:

      # dnf --refresh info --available redhat-release

      This command shows any available updates. For example, when upgrading from Red Hat Enterprise Linux 8.2.z to 8.3, compare the version of the package with the currently installed version:

      Available Packages
      Name         : redhat-release
      Version      : 8.3
      Release      : 1.0.el8
      …​
      Caution

      The Red Hat Enterprise Linux Advanced Virtualization module is usually released later than the Red Hat Enterprise Linux y-stream. If no new Advanced Virtualization module is available yet, or if there is an error enabling it, stop here and cancel the upgrade. Otherwise you risk corrupting the host.

    3. If the Advanced Virtualization stream is available for Red Hat Enterprise Linux 8.3 or later, reset the virt module:

      # dnf module reset virt
      Note

      If this module is already enabled in the Advanced Virtualization stream, this step is not necessary, but it has no negative impact.

      You can see the value of the stream by entering:

      # dnf module list virt
    4. Enable the virt module in the Advanced Virtualization stream with the dnf module enable virt:8.y command, where y is the version of the stream. For example, if the value for the stream is 8.3, enter the following command:

      # dnf module enable virt:8.3
  5. Update the host:

    # dnf upgrade --nobest
  6. Reboot the host to ensure all updates are correctly applied.

    Note

    Check the imgbased logs to see if any additional package updates have failed for a Red Hat Virtualization Host. If some packages were not successfully reinstalled after the update, check that the packages are listed in /var/imgbased/persisted-rpms. Add any missing packages then run rpm -Uvh /var/imgbased/persisted-rpms/*.

Repeat this process for each host in the Red Hat Virtualization environment.