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 so that you can access the updates from the Red Hat Content Distribution Network or from a Red Hat Satellite server.
This post focuses on updates between “minor releases” of Red Hat Virtualization 4.1. In this context, that means updates between different releases of Red Hat Virtualization 4.1, for example from 4.1.4 to 4.1.7. When the documentation discusses upgrades between “major releases”, it generally considers an update from 4.0 to 4.1 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.
When installing software updates for Red Hat Virtualization Manager, you can’t just run yum update. To ensure RHVM is correctly updated without inadvertently installing incompatible versions of the RHVM packages, a number of RHV-related packages are protected from updates and are skipped by a normal yum update command. You need to run some preparatory commands before running yum update in order to ensure that RHVM is properly updated.
NOTE: A normal yum update does not update RHVM, since the RHV installation locked the RHVM 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
Administrators can check the availability of RHV Manager updates by using the engine-upgrade-check command.
If no new updates are available, the engine-upgrade-check command outputs this information:
[[email protected] ~]# 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.
[[email protected] ~]# 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, postinstallation configuration, and starts the ovirt-engine service.
[[email protected] ~]# engine-setup
Note: The update process takes time. It needs to download all the necessary packages, and go over the process of updating 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:
[[email protected] ~]# yum update
NOTE: If the kernel package was updated during the process, a reboot of the RHVM server is required.
Updating RedHat Virtualization Hosts (RHVH)
Administrators can use the host upgrade manager to update RHVH 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 RHVH hosts need to be registered and attached to software entitlements for Red Hat Enterprise Linux and Red Hat Virtualization so that you can access the updates from the Red Hat Content Distribution Network or from 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.
NOTE: Only RHVH hosts that are Up or Non-Operational are checked by the upgrade manager. Hosts in Maintenance mode are skipped
The update manager uses yum check-update command on RHVH hosts to automatically check for available updates to the RHVH 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 RHVH hosts. You can do this by logging into each RHVH host using Cockpit. In the Subscriptions subtab of Cockpit, click Register to register with your Customer Portal account information. Then open the Terminal subtab and run the following command:
# 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 RHVM server by using the engine-config command with the HostPackagesUpdateTimeInHours configuration value.
[[email protected] ~]# engine-config -s HostPackagesUpdateTimeInHours=48
On RHVH hosts, the whole image is updated. Only the content of /etc and /var directories is preserved during the update. Any other data is replaced during an update.
During a host update, if migration is enabled at the cluster level, RHV automatically triggers 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 needs to be one host available in the cluster to perform Storage Pool Manager (SPM) tasks. Since the RHVH host being updated will be put temporarily into Maintenance mode, the cluster needs to have enough memory and other resources on the remaining hosts to support the migrated virtual machines. Otherwise, the virtual machine migration will fail.
This procedure outlines the steps needed to update a RHVH host:
- Log in to the Administration Portal as an administrative user.
- Navigate to the Hosts tab.
- On the list of available RHVH hosts, right-click the appropriate host, and choose Installation → Check for Upgrade from the displayed menu.
- When the Upgrade Host dialog window opens, click OK to confirm the upgrade check.
- After a while, a new Action Item icon may appear next to the RHVH host. This new icon is an indicator that an upgrade for this host is available.
- Right-click the host again and from the displayed menu, choose Installation → Upgrade.
- In the Upgrade Host dialog window, click the OK button to start the upgrade.
- The upgrade procedure takes place. The host’s status should change to Preparing for Maintenance, Maintenance, Installing, Reboot, Unresponsive, and finally to Up.