Red Hat Training
A Red Hat training course is available for Red Hat Virtualization
Upgrade Guide
Update and upgrade tasks for Red Hat Virtualization
Abstract
Chapter 1. Updating the Red Hat Virtualization Environment
1.1. Update Overview
- Subscribe to the appropriate entitlements
- Update the system
- Run engine-setup
- Remove repositories no longer required.
Hosts can be upgraded directly from the Red Hat Virtualization Manager which checks for and notifies you of available host updates.
Chapter 2. Updates between Minor Releases
2.1. Updating the Red Hat Virtualization Manager
Procedure 2.1. Updating Red Hat Virtualization Manager
- On the Red Hat Virtualization Manager machine, check if updated packages are available:
# engine-upgrade-check
- If there are no updates are available, the command will output the text
No upgrade
:# engine-upgrade-check VERB: queue package ovirt-engine-setup for update VERB: package ovirt-engine-setup queued VERB: Building transaction VERB: Empty transaction VERB: Transaction Summary: No upgrade
Note
If updates are expected, but not available, ensure that the required repositories are enabled. See Subscribing to the Required Entitlements in the Installation Guide. - If updates are available, the command will list the packages to be updated:
# engine-upgrade-check VERB: queue package ovirt-engine-setup for update VERB: package ovirt-engine-setup queued VERB: Building transaction VERB: Transaction built VERB: Transaction Summary: VERB: updated - ovirt-engine-lib-3.3.2-0.50.el6ev.noarch VERB: update - ovirt-engine-lib-3.4.0-0.13.el6ev.noarch VERB: updated - ovirt-engine-setup-3.3.2-0.50.el6ev.noarch VERB: update - ovirt-engine-setup-3.4.0-0.13.el6ev.noarch VERB: install - ovirt-engine-setup-base-3.4.0-0.13.el6ev.noarch VERB: install - ovirt-engine-setup-plugin-ovirt-engine-3.4.0-0.13.el6ev.noarch VERB: updated - ovirt-engine-setup-plugins-3.3.1-1.el6ev.noarch VERB: update - ovirt-engine-setup-plugins-3.4.0-0.5.el6ev.noarch Upgrade available Upgrade available
- Update the ovirt-engine-setup package:
# yum update ovirt-engine-setup
- Update the Red Hat Virtualization Manager. By running
engine-setup
, the script will prompt you with some configuration questions like updating the firewall rules, updating PKI certificates, and backing up the Data Warehouse database. The script will then go through the process of stopping theovirt-engine
service, downloading and installing the updated packages, backing up and updating the database, performing post-installation configuration, and starting theovirt-engine
service.Note
Theengine-setup
script is also used during the Red Hat Virtualization Manager installation process, and it stores the configuration values that were supplied. During an update, the stored values are displayed when previewing the configuration, and may not be up to date ifengine-config
was used to update configuration after installation. For example, ifengine-config
was used to updateSANWipeAfterDelete
totrue
after installation,engine-setup
will output "Default SAN wipe after delete: False" in the configuration preview. However, the updated values will not be overwritten byengine-setup
.# engine-setup
Important
The update process may take some time; allow time for the update process to complete and do not stop the process once initiated. - Update the base operating system and any optional packages installed on the Manager:
# yum update
Important
If any kernel packages were updated, reboot the system to complete the update.
2.2. Updating Hosts
Note
UserPackageNamesForCheckUpdate
. Run the engine-config
command on the Manager machine. For example:
# engine-config -m UserPackageNamesForCheckUpdate=vdsm-hook-ethtool-options
Warning
yum update
as shown in Section 2.3, “Manually Updating Hosts”.
yum check-update
to automatically check for updates to the RHVH image, provided that you registered the host and enabled the Red Hat Virtualization Host 7
repository when installing the host. This repository contains the redhat-virtualization-host-image-update
package, which is responsible for updating the image. See Installing Red Hat Virtualization Host in the Installation Guide for
yum update
for other packages is not necessary. Modified content in only the /etc
and /var
directories is preserved during an update. Modified data in other paths is completely replaced during an update.
HostPackagesUpdateTimeInHours
configuration value. Run the engine-config
command on the Manager machine. For example:
# engine-config -s HostPackagesUpdateTimeInHours=48
HostPackagesUpdateTimeInHours
configuration value. Automatic upgrade checks are not always needed, for example, when managing the hosts with Satellite. Run the engine-config
command on the Manager machine:
# engine-config -s HostPackagesUpdateTimeInHours=0
Important
Important
# subscription-manager repos --disable=rhel-7-server-rhevh-rpms # subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms
Procedure 2.2. Updating Red Hat Enterprise Linux hosts and Red Hat Virtualization Host
- Click the Hosts tab and select the host to be updated.
- If the host requires updating, an alert message under Action Items and an icon next to the host's name indicate that a new version is available.
- If the host does not require updating, no alert message or icon is displayed and no further action is required.
- Click Installation → Check for Upgrade to open the Upgrade Host confirmation window.
- Click OK to begin the upgrade check.
- If you want to upgrade the host, click Installation → Upgrade to open the Upgrade Host confirmation window.
- Click OK to update the host. The details of the host are updated in the Hosts tab, and the status will transition through these stages:
- Maintenance
- Installing
- Up
Note
2.3. Manually Updating Hosts
yum
command in the same way as regular Red Hat Enterprise Linux systems. Red Hat Virtualization Host (RHVH) can use the yum
command for updates; however, installing additional packages is not currently supported. It is highly recommended that you use yum
to update your systems regularly, to ensure timely application of security and bug fixes. Updating a host includes stopping and restarting the host. If migration is enabled at cluster level, virtual machines are automatically migrated to another host in the cluster; as a result, it is recommended that host updates are performed at a time when the host's usage is relatively low.
Important
Important
# subscription-manager repos --disable=rhel-7-server-rhevh-rpms # subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms
Procedure 2.3. Manually Updating Hosts
- From the Administration Portal, click the Hosts tab and select the host to be updated.
- Click Maintenance to place the host into maintenance mode.
- On a Red Hat Enterprise Linux host, log in to the host machine and run the following command:
# yum update
- On a Red Hat Virtualization Host, log in to the Cockpit user interface, click Tools > Terminal, and run the following command:
# yum update
- Restart the host to ensure all updates are correctly applied.
Chapter 3. Upgrading to Red Hat Virtualization 4.0
3.1. Red Hat Virtualization 4.0 Upgrade Considerations
Important
- Upgrading to version 4.0 can only be performed from version 3.6
- To upgrade a version of Red Hat Enterprise Virtualization earlier than 3.6 to Red Hat Virtualization 4.0, you must sequentially upgrade to any newer versions of Red Hat Enterprise Virtualization before upgrading to the latest version. For example, if you are using Red Hat Enterprise Virtualization 3.5, you must upgrade to the latest minor version of Red Hat Enterprise Virtualization 3.6 before you can upgrade to Red Hat Virtualization 4.0. See the Upgrade Guide for Red Hat Enterprise Virtualization 3.6 for instructions to upgrade to the latest 3.6 minor version.The data center and cluster compatibility version must be at version 3.6 before performing the upgrade, and before upgrading hosts to 4.0 or later.
- Red Hat Virtualization Manager 4.0 is supported to run on Red Hat Enterprise Linux 7.2 or later
- Upgrading to version 4.0 involves also upgrading the base operating system of the machine that hosts the Manager.
3.2. Upgrading to Red Hat Virtualization Manager 4.0
Important
Important
Note
ovirt-engine-rename
to rename the Manager only if the Manager has a different FQDN after the upgrade.
engine-setup
. The settings for these package extensions are not migrated as part of the upgrade.
Procedure 3.1. Upgrading to Red Hat Virtualization Manager 4.0
- On Red Hat Enterprise Virtualization Manager 3.6, back up the environment.
# engine-backup --scope=all --mode=backup --file=backup.bck --log=backuplog.log
- Copy the backup file to a suitable device.
- If the ISO storage domain is on the same host as the engine, back up the contents of
/var/lib/exports/iso
:# cd /var/lib/exports/iso # tar zcf iso_domain.tar.gz UUID
The ISO storage backup file will be restored after the upgrade, in Section 3.3, “Migrating the ISO Domain” . - Install Red Hat Enterprise Linux 7. See the Red Hat Enterprise Linux Installation Guide for more information.
- Install Red Hat Virtualization Manager 4.0. See the Red Hat Virtualization Installation Guide.
- Copy the backup file to the Red Hat Virtualization Manager 4.0 machine and restore it.
# engine-backup --mode=restore --file=backup.bck --log=restore.log --provision-db --provision-dwh-db --restore-permissions
Note
If the backup contained grants for extra database users, this command will create the extra users with random passwords. You must change these passwords manually if the extra users require access to the restored system. See https://access.redhat.com/articles/2686731.Note
Use the--provision-dwh-db
option if the backup contains Data Warehouse data.Reports have been deprecated in Red Hat Virtualization 4.0 and will not be restored. See BZ#1340810 for more information. - Install optional extension packages if they were installed on the Red Hat Enterprise Virtualization Manager 3.6 machine.
# yum install ovirt-engine-extension-aaa-ldap ovirt-engine-extension-aaa-misc ovirt-engine-extension-logger-log4j
Note
The configuration for these package extensions must be manually reapplied because they are not migrated as part of the backup and restore process. - Decommission the Red Hat Enterprise Virtualization Manager 3.6 machine if a different machine is used for Red Hat Virtualization Manager 4.0.
- Run
engine-setup
to configure the Manager.# engine-setup
- Run
ovirt-engine-rename
to rename the Manager only if the FQDN differs from the Red Hat Enterprise Virtualization Manager 3.6 machine, and follow the prompts to set the new details.# /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename
Note
# subscription-manager repos --disable=rhel-7-server-rhev-mgmt-agent-rpms
# subscription-manager repos --enable=rhel-7-server-rhv-4-mgmt-agent-rpms
3.3. Migrating the ISO Domain
iso_domain.tar.gz
backup file that you created in Section 3.2, “Upgrading to Red Hat Virtualization Manager 4.0”.
Note
- Create an export directory and set its permissions:
# mkdir -p /var/lib/exports/iso # chown -R 36:36 /var/lib/exports/
- Extract the ISO domain backup to this directory:
# cd /var/lib/exports/iso # tar zxf iso_domain.tar.gz
- Set the SELinux context for the files in the export directory:
# chcon -R system_u:object_r:public_content_rw_t:s0 /var/lib/exports/iso/
- Create
/etc/exports.d/ovirt-engine-iso-domain.exports
with the following line:/var/lib/exports/iso *(rw)
- Edit the following lines in
/etc/sysconfig/nfs
:RPCMOUNTDOPTS="-p 892" (..snip..) STATDARGS="-p 662 -o 2020" (..snip..) LOCKD_UDPPORT=32769 LOCKD_UDPPORT=32803 RPCRQUOTAOPTS="-p 875"
- Enable the
nfs
service:# systemctl enable nfs # systemctl start nfs
- Allow services and ports with firewalld:
# firewall-cmd --add-service={nfs,rpc-bind} # firewall-cmd --add-service={nfs,rpc-bind} --permanent # firewall-cmd --add-port={32769/udp,32803/tcp,662/tcp,662/udp,875/tcp,875/udp,892/tcp,892/udp} # firewall-cmd --add-port={32769/udp,32803/tcp,662/tcp,662/udp,875/tcp,875/udp,892/tcp,892/udp} --permanent
3.4. Upgrading to RHVH While Preserving Local Storage
Procedure 3.2. Upgrading to RHVH While Preserving Local Storage
- Ensure the RHEV-H host's local storage is in maintenance mode before starting this process:
- Open the Data Centers tab.
- Click the Storage tab in the details pane and select the storage domain in the results list.
- Click Maintenance.
- Reinstall the Red Hat Virtualization Host, as described in Installing Red Hat Virtualization Host in the Installation Guide.
Important
When selecting the device on which to install RHVH from the Installation Destination screen, do not select the device(s) storing the virtual machines. Only select the device where the operating system should be installed.If you are using kickstart to install the host, ensure that you preserve the devices containing the virtual machines by adding the following to the kickstart file, replacing device with the relevant device.# clearpart --all --drives=device
For more information on using kickstart, see Kickstart Syntax Reference in the Red Hat Enterprise Linux 7 Installation Guide. - On the reinstalled host, create a directory, for example
/data
in which to recover the previous environment.# mkdir /data
- Mount the previous local storage in the new directory. In our example,
/dev/sdX1
is the local storage:# mount /dev/sdX1 /data
- Set the following permissions for the new directory.
# chown -R 36:36 /data # chmod -R 0755 /data
- Red Hat recommends that you also automatically mount the local storage via /
etc/fstab
in case the server requires a reboot:# blkid | grep -i sdX1 /dev/sdX1: UUID="a81a6879-3764-48d0-8b21-2898c318ef7c" TYPE="ext4" # vi /etc/fstab UUID="a81a6879-3764-48d0-8b21-2898c318ef7c" /data ext4 defaults 0 0
- In the Administration Portal, create a data center and select
Local
in the Storage Type drop-down menu. - Configure a cluster on the new data center. See Creating a New Cluster in the Administration Guide for more information.
- Add the host to the Manager. See Adding a Host to the Red Hat Virtualization Manager in the Installation Guide for more information.
- On the host, create a new directory that will be used to create the initial local storage domain. For example:
# mkdir -p /localfs # chown 36:36 /localfs # chmod -R 0755 /localfs
- In the Administration Portal, open the Storage tab and click New Domain to create a new local storage domain.Define
localfs
as the Name and/localfs
as the Path. - Once the local storage is
Active
, select Import Domain and define the domain's details.For example, defineData
as the Name,Local on Host
as the Storage Type and/data
as the Path. - Click OK to confirm the message that appears informing you that storage domains are already attached to the data center.
- Activate the new storage domain:
- Open the Data Centers tab.
- Click the Storage tab in the details pane and select the new
Data
storage domain in the results list. - Click Activate.
- Once the new storage domain is
Active
, import the virtual machines and their disks:- In the Storage tab, select
data
. - Select the VM Import tab in the details pane, select the virtual machine(s) and click Import. See Importing Virtual Machines from Imported Data Storage Domains in the Administration Guide for more details.
- Once you have ensured that all virtual machines have been successfully imported and are functioning properly, you can move
localfs
to maintenance mode.- Click the Storage tab and select
localfs
from the results list. - Click the Data Center tab in the details pane.
- Click Maintenance, then click OK to move the storage domain to maintenance mode.
- Click Detach to open the Detach Storage confirmation window.
- Click OK.
3.5. Migrating Virtual Machines
Warning
Note
Procedure 3.3. Adding an Upgraded Host to a Cluster
- Upgrade a host in the current cluster to a later version. See Section 2.2, “Updating Hosts” for details.
- Add the later version host to the current cluster:
- Click Maintenance to place the later version host in Maintenance mode.
- Click Edit.
- In the General tab, select the current cluster in the drop-down list.
- Click OK.
- Click Activate to bring the later version host out of Maintenance mode.
Procedure 3.4. Adding a New Host to a Cluster
- Create a new host running a later version of Red Hat Virtualization. See Red Hat Enterprise Linux Hosts (4.0) or Red Hat Enterprise Linux Hosts (4.1) in the Installation Guide for details.
- Add the later version host to the current cluster:
- In the Hosts tab, click New.
- Select a Datacenter and a Cluster compatible with the later version of Red Hat Virtualization on the drop-down lists.
- Enter the Name, Address, and Password of the new host.
- Click OK.
Procedure 3.5. Migrating Virtual Machines
- Check that all virtual machines can migrate automatically:
- In the Virtual Machines tab, select a virtual machine.
- Click Edit.
- Click the Hosts tab and check that Any Host in Cluster is selected.
- Check that Migration Mode is set to
Allow manual and automatic migration
- Click OK.
- Place the earlier version hosts in Maintenance mode to trigger automatic migration of the virtual machines:
- In the Hosts tab, select an earlier version host.
- Click Maintenance to place the host in Maintenance mode.
- Click OK.
- Repeat these steps until all the virtual machines are running on the later version hosts.
- Change the cluster compatibility level to the later version. See Section 4.1, “Changing the Cluster Compatibility Version” for details.
- Stop and start each migrated virtual machine:
- In the Virtual Machines tab, select a virtual machine.
- Click Shutdown.
- Click Run.
3.6. Upgrading the Self-Hosted Engine
Note
Chapter 4. Post-Upgrade Tasks
4.1. Changing the Cluster Compatibility Version
Note
Procedure 4.1. Changing the Cluster Compatibility Version
- From the Administration Portal, click the Clusters tab.
- Select the cluster to change from the list displayed.
- Click Edit.
- Change the Compatibility Version to the desired value.
- Click OK to open the Change Cluster Compatibility Version confirmation window.
- Click OK to confirm.
4.2. Changing the Data Center Compatibility Version
Note
Procedure 4.2. Changing the Data Center Compatibility Version
- From the Administration Portal, click the Data Centers tab.
- Select the data center to change from the list displayed.
- Click Edit.
- Change the Compatibility Version to the desired value.
- Click OK to open the Change Data Center Compatibility Version confirmation window.
- Click OK to confirm.
Appendix A. Updating an Offline Red Hat Virtualization Manager
A.1. Updating the Local Repository for an Offline Red Hat Virtualization Manager Installation
- On the system hosting the repository, synchronize the repository to download the most recent version of each available package:
# reposync -l --newest-only /var/ftp/pub/rhevrepo
This command may download a large number of packages, and take a long time to complete. - Ensure that the repository is available on the Manager system, and then update or upgrade the Manager system. See Section 2.1, “Updating the Red Hat Virtualization Manager” for information on updating the Manager between minor versions. See Section 1.1, “Update Overview” for information on upgrading between major versions.