Bookmark this page

Updating and Upgrading Red Hat Virtualization

Objectives

After completing this section, you should be able to perform upgrades and minor updates to Red Hat Virtualization Manager and Red Hat Virtualization Hosts.

Updating RHV-M

Keeping your Red Hat Virtualization environment updated is a recommended practice. Updates for all Red Hat products are released using the Content Delivery Network. Ensure that all RHV environment components are registered and attached to software entitlements for Red Hat Enterprise Linux and Red Hat Virtualization. This ensures that you can access the updates from the Red Hat Content Distribution Network or from a Red Hat Satellite server.

Distinguishing Between Updates and Upgrades

This section focuses on updates between "minor releases" of Red Hat Virtualization 4.3. In this context, that means updates between different releases of Red Hat Virtualization 4.3, for example from 4.3.4 to 4.3.7.

When the documentation discusses upgrades between "major releases," it generally considers an update from 4.2 to 4.3 as a "major" release. This is because changes between those versions may involve updating cluster and data center compatibility versions, and may add or change features, among other things.

The Red Hat Virtualization Upgrade Guide on the Customer Portal discusses special considerations when upgrading from RHV 4.2 and earlier to RHV 4.3, but this section will not go into detail on upgrading the system.

The Yum Versionlock Method of Software Maintenance

Many major complex Red Hat software products use version locking. RHV-M keeps track of packages that make up the application, and knows which packages need to update together. If package X uses version 2.1, package Y uses 4.2, and updating package X by itself will break the application, then Versionlock will lock out the updating process for these particular packages, which must stay in sync. The engine-setup program knows the packages and versions that sync together, and will only unlock the packages that can be safely updated. To update the setup packages, run the yum update ovirt\*setup\* command. When you subsequently run the engine-setup command, the ovirt-engine service is stopped, and then downloads and installs the updated packages.

When installing software updates for Red Hat Virtualization Manager, you cannot only run yum update. To ensure RHV-M is correctly updated without inadvertently installing incompatible versions of the RHV-M packages, many RHV-related packages are protected from updates and are skipped by a normal yum update command.

Important

A normal yum update does not update RHV-M, because the RHV installation locked the RHV-M packages from updates by using the yum-plugin-versionlock package. The list of locked packages is in the file /etc/yum/pluginconf.d/versionlock.list.

Checking for updates for RHV-M when using a self-hosted engine requires some extra steps. Prior to the update, the RHV environment needs to be placed into global maintenance mode. When the update completes, the RHV environment needs to be taken out of global maintenance mode. These actions can be taken from a terminal on the RHV-H machine that is running the self-hosted engine. You can identify this host from the Administration Portal. Click Compute in the menu bar and then select Hosts. One of the hosts should have a gold crown icon in its row. Hovering over the crown icon reveals the message, Running the Hosted Engine VM. Connect to a terminal on that host and place the RHV environment into global maintenance mode.

[root@host ~]# hosted-engine --set-maintenance --mode=global

You can check the availability of RHV Manager updates by using the engine-upgrade-check command on the RHV-M machine.

If no new updates are available, the engine-upgrade-check command outputs this information:

[root@demo ~]# engine-upgrade-check
VERB: queue package ovirt-engine-setup for update
VERB: Building transaction
VERB: Empty transaction
VERB: Transaction Summary:
No upgrade is available for the setup package.
Please note that system may not be up to date if engine-setup wasn't executed after yum update.

If there are packages to update, the command lists them all.

To update the setup packages, issue the yum update ovirt\*setup\* command.

[root@host ~]# yum update ovirt\*setup\*

With the setup packages updated to the most current version, execute the engine-setup command as root without arguments. This script updates the Red Hat Virtualization Manager. It stops the ovirt-engine service, and then downloads and installs all the updates. During this process, it also creates a backup of the database, performs the update of the database, applies post-installation configuration, and starts the ovirt-engine service.

[root@host ~]# engine-setup

Important

The update process takes time. It must download all the necessary packages and review updates required by the underlying software. Allow time for the process to complete and do not stop the update once initiated.

At the end of this process, update the operating system and any other installed packages by issuing a normal yum update command. This ensures that all the latest RHEL OS packages are supporting the latest RHV-M engine packages.

[root@host ~]# yum update

Important

If the kernel package was updated during the process, a reboot of the RHV-M server is required.

The RHV environment must be placed back into normal mode. Using the hosted-engine command, set the maintenance mode back to none.

[root@host ~]# hosted-engine --set-maintenance --mode=none

Updating Red Hat Virtualization Hosts

Administrators can use the host upgrade manager to update RHV-H hosts directly from the Administration Portal. In a large environment with many hosts, using the upgrade manager to update hosts instead of manually updating each host can save time by automating the necessary steps.

For this procedure to work, all the RHV-H hosts must be registered, and attached to the software entitlements for Red Hat Enterprise Linux and Red Hat Virtualization. This enables access to the updates from the Red Hat Content Distribution Network or a Red Hat Satellite server. When the hosts are registered and entitled, the upgrade manager checks for updates automatically and notifies of any available host updates.

Important

Only RHV-H hosts that are Up or Non-Operational are checked by the upgrade manager. Hosts in Maintenance mode are skipped.

The update manager uses the yum check-update command on RHV-H hosts to automatically check for available updates to the RHV-H image. For these automation checks to work, you need to enable the Red Hat Virtualization Host 7 (rhel-7-server-rhvh-4-rpms) repository on the RHV-H hosts. You can do this by logging into each RHV-H host using the Web Console. In the Subscriptions tab of the Web Console, click Register to register with your Customer Portal account information. Then, open the Terminal tab and run the following command:

[root@host ~]# subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms

By default, the upgrade manager checks for updates every 24 hours. You can change that setting on the RHV-M server by using the engine-config command with the HostPackagesUpdateTimeInHours configuration value. Changes made with the engine-config command are not applied until you restart the ovirt-engine service.

[root@host ~]# engine-config -s HostPackagesUpdateTimeInHours=48

On RHV-H hosts, the whole image is updated. Only the content of the /etc and /var directories are preserved during the update. Any other data is replaced during an update.

During a host update, if migration is enabled at the cluster level, then RHV automatically triggers a migration of running virtual machines to other hosts in the cluster. Before starting the update, ensure that there is more than one host in the cluster. There must be one host available in the cluster to perform Storage Pool Manager (SPM) tasks. Since the RHV-H host that is updated will be put temporarily into Maintenance mode, the cluster must have enough memory and other resources on the remaining hosts to support the migrated virtual machines. Otherwise, the virtual machine migration will fail.

Although whole clusters of hosts can be upgraded automatically using the Ansible Playbook method, single host minor upgrades can be manually initiated by a user with sufficient Administration Portal privileges when an upgrade is available.

Locate an intended cluster host in the Hosts tab. To determine if an update is available, select the row for that host in the table and choose the Check for Upgrade option from the Installation drop-down menu. If an upgrade has been made available, the Upgrade option on the same Installation drop-down menu will become available to select.

After starting an upgrade, the selected host will transition through a series of states, including Preparing for Maintenance, Maintenance, Installing, Reboot, and Unresponsive, before finishing with an Up state. After virtual machines are migrated away from the host, a minor upgrade is expected to take only minutes to install.

References

Further information is available in the Updating a Self-Hosted Engine section of the Administration Guide for Red Hat Virtualization at https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html-single/administration_guide/index#Updating_a_self-hosted_engine_SHE_admin

Revision: rh318-4.3-c05018e