6 Updating Your Environment

You can update your engine, self-hosted engine, and KVM hosts within versions, such as from 4.5 to the latest version of 4.5.

However, if you want to move from one version to another, such as 4.4 to 4.5, this is considered an upgrade. See Upgrading Your Environment to 4.5.

Important:

(ULN registered hosts only) Before you begin the update process, run the following commands on your engine and KVM hosts:
echo "Disabling yum module virt:ol"
/usr/bin/dnf -y module disable virt:ol  > /dev/null

echo "Enabling yum module virt:kvm_utils2"
/usr/bin/dnf -y module enable virt:kvm_utils2  > /dev/null

echo "Enabling module pki-deps"
/usr/bin/dnf -y module enable pki-deps  > /dev/null

echo "Enabling module postgresql:13"
/usr/bin/dnf -y module enable postgresql:13  > /dev/null

echo "Enabling module nodejs:18"
/usr/bin/dnf -y module reset nodejs  > /dev/null
/usr/bin/dnf -y module enable nodejs:18  > /dev/null

echo "Exclude ansible-core updates from OL ol8_appstream"
/usr/bin/dnf -y config-manager --setopt="exclude=ansible-core"  > /dev/null

echo "Version lock gluster-ansible* packages"
/usr/bin/dnf install -y 'dnf-command(versionlock)' > /dev/null
/usr/bin/dnf versionlock gluster-ansible-cluster-1.0-2.1*  > /dev/null
/usr/bin/dnf versionlock gluster-ansible-features-1.0.5-9*  > /dev/null
/usr/bin/dnf versionlock gluster-ansible-infra-1.0.4-18*  > /dev/null
/usr/bin/dnf versionlock gluster-ansible-maintenance-1.0.1-10*  > /dev/null
/usr/bin/dnf versionlock gluster-ansible-repositories-1.0.1-3*  > /dev/null
/usr/bin/dnf versionlock gluster-ansible-roles-1.0.5-23*  > /dev/null

Updating the Engine

Important:

If you are upgrading your environment, refer to Updating engine or self-hosted engine to 4.4 in the Upgrading Your Environment to 4.5 section.

To update your engine:

  1. Update the release rpm.
    • If you are updating from 4.4 to the latest version of 4.4, run:
      # dnf update oracle-ovirt-release-el8
    • If you are updating from 4.5 to the latest version of 4.5, run:
      # dnf update oracle-ovirt-release-45-el8
  2. Check to see if your engine is eligible to update and if there are updates for any packages.

    # engine-upgrade-check
    ...
    Upgrade available.
  3. Update the setup packages and resolve dependencies.

    # dnf update ovirt\*setup\*
    ...
    Complete!
  4. Update the engine:
    # engine-setup

    Important:

    The update process might take some time. Do not stop the process before it completes.

    The engine-setup script:

    • Prompts you with some configuration questions

      For more information, see Engine Configuration Options in the Oracle Linux Virtualization Manager: Getting Started.

    • Stops the ovirt-engine service

    • Downloads and installs the updated packages

    • Backs up and updates the database

    • Performs post-installation configuration

    • Starts the ovirt-engine service

    Note:

    The engine-setup script displays stored configuration values supplied during the initial engine installation process. These stored values display when previewing the configuration and may not be up to date if you ran engine-config after installation. However, engine-setup will not overwrite your updated values.

    For example, if you ran engine-config to update SANWipeAfterDelete to true after installation, engine-setup outputs Default SAN wipe after delete: False in the configuration preview. However, engine-setup will not apply this value; rather, it will keep the SANWipeAfterDelete to true setting.

    If the update is successful, you will see:

    Execution of setup completed successfully

    If the update fails, the engine-setup command attempts to rollback your installation to its previous state. If you encounter a failed update, detailed instructions display explaining how to restore your installation.

  5. Update the base operating system and any optional packages installed.

    # dnf update

    Important:

    If any core libraries or services were upgraded, reboot the system to complete the changes. Run the following command to confirm a reboot is required: dnf needs-restarting -r,

Updating the Self-Hosted Engine

Important:

If you are upgrading your environment, refer to Updating engine or self-hosted engine to 4.4 in the Upgrading Your Environment to 4.5 section.

Before you can update your self-hosted engine, you must place the self-hosted engine environment in global maintenance mode.

  1. Log into your self-hosted engine host and enable global maintenance mode.

    # hosted-engine --set-maintenance --mode=global
  2. Confirm that the environment is in maintenance mode .

    # hosted-engine --vm-status

    You should see the following message indicating that the cluster is in maintenance mode.

    !! Cluster is in GLOBAL MAINTENANCE mode !!
  3. Update the release rpm.
    • If you are updating from 4.4 to the latest version of 4.4, run:
      # dnf update oracle-ovirt-release-el8
    • If you are updating from 4.5 to the latest version of 4.5, run:
      # dnf update oracle-ovirt-release-45-el8
  4. Log in to the engine virtual machine and check to see if your engine is eligible to update and if there are updates for any packages.
    # engine-upgrade-check
    ...
    Upgrade available.
  5. Update the setup packages and resolve dependencies.

    # dnf update ovirt\*setup\*
    ...
    Complete!
  6. Update the self-hosted engine:
    # engine-setup

    Important:

    The update process might take some time. Do not stop the process before it completes.

    The engine-setup script:

    • Prompts you with some configuration questions

      For more information, see Engine Configuration Options in the Oracle Linux Virtualization Manager: Getting Started.

    • Stops the ovirt-engine service

    • Downloads and installs the updated packages

    • Backs up and updates the database

    • Performs post-installation configuration

    • Starts the ovirt-engine service

    Note:

    The engine-setup script displays stored configuration values supplied during the initial engine installation process. These stored values display when previewing the configuration and may not be up to date if you ran engine-config after installation. However, engine-setup will not overwrite your updated values.

    For example, if you ran engine-config to update SANWipeAfterDelete to true after installation, engine-setup outputs Default SAN wipe after delete: False in the configuration preview. However, engine-setup will not apply this value; rather, it will keep the SANWipeAfterDelete to true setting.

    If the update is successful, you will see:

    Execution of setup completed successfully

    If the update fails, the engine-setup command attempts to rollback your installation to its previous state. If you encounter a failed update, detailed instructions display explaining how to restore your installation.

  7. Update the base operating system and any optional packages installed on the engine.

    # dnf update

    Important:

    If any core libraries or services were upgraded, reboot the system to complete the changes. Run the following command to confirm a reboot is required: dnf needs-restarting -r,

After you update your self-hosted engine, you must disable global maintenance mode for the self-hosted engine environment.

  1. Log in to the engine virtual machine and shut it down.

  2. Log in to the self-hosted engine host and disable global maintenance mode.

    # hosted-engine --set-maintenance --mode=none

    Note:

    When you exit global maintenance mode, ovirt-ha-agent starts the engine virtual machine, and then the engine automatically starts. This process can take up to ten minutes.

  3. Confirm that the environment is running.

    # hosted-engine --vm-status

    The status information shows Engine Status and its value should be:

    {"health": "good", "vm": "up", "detail": "Up"}

    When the virtual machine is still booting and the engine hasn’t started yet, the Engine status is:

    {"reason": "bad vm status", "health": "bad", "vm": "up", "detail": "Powering up"}

    If this happens, wait a few minutes and try again.

Updating KVM Hosts

Important:

If you are upgrading your environment, refer to Before You Beginin the Upgrading Your Environment to 4.5 section.

Before you update a KVM host, here are a few considerations.

  • If migration is enabled at the cluster level, virtual machines are automatically migrated to another host in the cluster.

  • The cluster must contain more than one host before performing an update.

  • Do not attempt to update all hosts at the same time because one host must remain available to perform Storage Pool Manager (SPM) tasks.

  • The cluster must have sufficient memory reserve in order for its hosts to perform maintenance. If a cluster lacks sufficient memory, the virtual machine migration hangs and then fails. You can reduce the memory usage of virtual machine migration by shutting down some or all virtual machines before updating the host.

  • You cannot migrate a virtual machine using a vGPU to a different host. Virtual machines with vGPUs installed must be shut down before updating the host.

To update a KVM host, follow the instructions below.

Connect to the KVM host:

  1. Open a terminal.
  2. Connect to the KVM host.
  3. Run the following command:
    # dnf update oracle-ovirt-release-el8

After you are connected to the KVM host, complete the following steps in the Administration Portal:

  1. In the Administration portal, go to Compute and then click Hosts.

  2. In the Hosts pane, click a blank or non-linked cell for a host to select it.

  3. Click Installation and then Check for Upgrade.

  4. From the Upgrade Host window, click OK.

    The engine checks the KVM host to see if it requires an update.

  5. Using your mouse, hover over the icon next to the host name to see if an update is available.
  6. To proceed with the update, click Installation and then Upgrade.

  7. From the Upgrade Host window, click OK to begin the update process.

    On the Hosts pane you can watch the host transition through the update stages: Maintenance, Installing, Up. The host is rebooted after the update and displays a status of Up if successful. If any virtual machines were migrated off the host, they are migrated back.

    Note:

    If the update fails, the host’s status changes to Install Failed and you must click Installation and then Upgrade again.

  8. (Optional) Repeat the previous steps for any KVM host in your environment that you want to update.