This is a cache of https://developer.ibm.com/tutorials/preparing-ova-for-openshift-on-cloud/. It is a snapshot of the page as it appeared on 2025-11-14T13:21:30.854+0000.
Creating OVA images for Red Hat OpenShift Container Platform on IBM Power Virtual Servers - IBM Developer
A Red Hat® OpenShift® cluster in IBM® Power® Virtual Server requires two images:
A Red Hat Enterprise Linux (RHEL) 9.4 or later image – This is used by the bastion node
Red Hat Enterprise Linux CoreOS image – This is used on the OpenShift cluster nodes
This tutorial shows how to create OVA formatted images for both RHEL and Red Hat Enterprise Linux CoreOS, and upload them to IBM Cloud Object Storage. You can then import these images as boot images in your IBM Power Virtual Server service. Note that the image disk should be a minimum of 120 gB in size.
It should be noted that RHEL and CentOS Stream images are now available from the Power virtual server Image catalog. We recommend using one of these catalog images instead of building your own.
Make sure that the following prerequisites are met before you begin creating the OVA images:
Access to shell on an IBM Power® logical partition (LPAR) running RHEL 9.x or CentOS Stream 9 with internet connectivity and minimum 250 gB of free disk space. This LPAR should have package repositories configured. You can also provision a CentOS Stream 9 instance on Power Virtual server and use it for the steps described in this tutorial.
RHEL subscription ID and password (not required if using CentOS).
It requires approximately 15-20 minutes for creating the OVA image and uploading them to IBM Cloud Object Storage. Another 15-20 minutes to import the OVA image to the Power Virtual Server instance.
Creating and uploading OVA files as boot images
Open a terminal on the IBM Power logical partition (LPAR) and perform the following steps to create and upload OVA files as boot images for RHEL and Red Hat Enterprise Linux CoreOS:
The following table describes the parameters used in the command to convert a Qcow2 image to the OVA format.
Parameter
Description
--image-name
Name of the resultant image (required)
--image-url
URL or absolute local file path to the .gz image (required)
--image-dist
Image distribution (supported: rhel, centos, coreos) (required)
--image-size
Size (in gB) of the resultant OVA image (default 11) (optional)
--target-disk-size
Size (in gB) of the target disk volume where OVA will be copied (default 120) (optional)
--rhn-user
Red Hat subscription username. Required when image distribution is rhel
--rhn-password
Red Hat subscription password. Required when image distribution is rhel
--os-password
Root user password. Will auto-generate the 12-bit password (applicable only for Red Hat and CentOS distributions) (optional)
--skip-os-password
Skip the root user password (optional)
-t, --temp-dir
Scratch space to use for OVA generation (default "/tmp") (optional)
For more options, run the following command:
pvsadm image qcow2ova –help
Copy codeCopied!
Sample RHEL image output
I0903 08:02:03.921983 106190 qcow2ova.go:179] Autogenerated OS root password is updated in /root/image-build/password.txt
I0903 08:02:03.922042 106190 validate.go:40] Checking: platform
I0903 08:02:03.922049 106190 validate.go:40] Checking: user
I0903 08:02:03.922055 106190 validate.go:40] Checking: image-name
I0903 08:02:03.922066 106190 validate.go:40] Checking: tools
I0903 08:02:03.922119 106190 tools.go:43] qemu-img found at /usr/bin/qemu-img
I0903 08:02:03.922162 106190 tools.go:43] growpart found at /usr/bin/growpart
I0903 08:02:03.922169 106190 validate.go:40] Checking: diskspace
I0903 08:02:03.922182 106190 diskspace.go:50] free: 66g, need: 61g
I0903 08:02:03.939681 106190 qcow2ova.go:252] Converting Qcow2(/tmp/qcow2ova1133581790/rhel-9.4-ppc64le-kvm.qcow2) image to raw(/tmp/qcow2ova1133581790/ova-img-dir/rhel-94-09032024-disk.raw) format
I0903 08:02:16.729139 106190 qcow2ova.go:257] Conversion completed
I0903 08:02:16.729181 106190 qcow2ova.go:259] Resizing the image /tmp/qcow2ova1133581790/ova-img-dir/rhel-94-09032024-disk.raw to 11g Image resized.
I0903 08:02:17.231176 106190 qcow2ova.go:264] Resize completed
I0903 08:02:17.231199 106190 qcow2ova.go:266] Preparing the image
/dev/loop0
3
CHANgED: partition=3 start=2107392 old: size=18864128 end=20971519 new: size=20961247 end=23068638
xfs
meta-data=/dev/loop0p3 isize=512 agcount=4, agsize=589504 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1 nrext64=0
data = bsize=4096 blocks=2358016, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal logbsize=4096 blocks=16384, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 2358016 to 2620155
/dev/loop0p2
mv: cannot stat '/etc/resolv.conf': No such file or directory
nameserver 9.9.9.9
Registeringto: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: fc108c9d-f1e0-47c8-b21f-e2f0acf2b5d7
[..snip..]
Installed:
DynamicRM-2.0.7-7.ppc64le
devices.chrp.base.ServiceRM-3.3.2.1-24011.ppc64le
ksh-3:1.0.6-3.el9.ppc64le
perl-File-Copy-2.34-481.el9.noarch
perl-autouse-1.11-481.el9.noarch
perl-lib-0.65-481.el9.ppc64le
perl-locale-1.09-481.el9.noarch
rsct.basic-3.3.2.1-24011.ppc64le
rsct.core-3.3.2.1-24011.ppc64le
rsct.core.utils-3.3.2.1-24011.ppc64le
rsct.opt.storagerm-3.3.2.1-24011.ppc64le
src-3.3.2.1-24011.ppc64le
Complete!
[..snip..]
Installed:
device-mapper-multipath-0.8.7-27.el9.ppc64le
device-mapper-multipath-libs-0.8.7-27.el9.ppc64le
libaio-0.3.111-13.el9.ppc64le
Complete!
generating initramfs for kernel version: 5.14.0-427.13.1.el9_4.ppc64le
generating initramfs for kernel version: 5.14.0-427.33.1.el9_4.ppc64le
generatinggrub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
Unregisteringfrom: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.
All local data removed
mv: cannot stat '/etc/resolv.conf.orig': No such file or directory
I0903 08:09:19.071787 106190 qcow2ova.go:271] Preparation completed
I0903 08:09:19.071827 106190 qcow2ova.go:273] Creating an OVA bundle
I0903 08:09:46.614649 106190 qcow2ova.go:278] OVA bundle creation completed: /tmp/qcow2ova1133581790/rhel-94-09032024.ova
I0903 08:09:46.614684 106190 qcow2ova.go:280] Compressing an OVA file
I0903 08:10:22.030171 106190 qcow2ova.go:286] OVA file Compression completed
Successfully converted Qcow2 image to OVA format, find at /root/image-build/rhel-94-09032024.ova.gz
OS root password: sOmeComplexpassword
Copy codeCopied!Show more
Sample Red Hat Enterprise Linux CoreOS output
I090307:58:43.304035106114 validate.go:40] Checking: platform
I090307:58:43.304089106114 validate.go:40] Checking: user
I090307:58:43.304103106114 validate.go:40] Checking: image-name
I090307:58:43.304116106114 validate.go:40] Checking: tools
I090307:58:43.304160106114 tools.go:43] qemu-img found at /usr/bin/qemu-imgI090307:58:43.304196106114 tools.go:43] growpart found at /usr/bin/growpart
I090307:58:43.304208106114 validate.go:40] Checking: diskspace
I090307:58:43.304224106114 diskspace.go:50] free: 67g, need: 66gI090307:59:02.524102106114 qcow2ova.go:252] Converting Qcow2(/tmp/qcow2ova1278991043/disk.qcow2) image to raw(/tmp/qcow2ova1278991043/ova-img-dir/rhcos-416-09032024-disk.raw) format
I090307:59:04.872828106114 qcow2ova.go:257] Conversion completed
I090307:59:04.872861106114 qcow2ova.go:259] Resizing the image /tmp/qcow2ova1278991043/ova-img-dir/rhcos-416-09032024-disk.raw to 16gImage resized.
I090307:59:09.752865106114 qcow2ova.go:264] Resize completed
I090307:59:09.752898106114 qcow2ova.go:266] Preparing the image
I090307:59:09.752916106114 prepare.go:182] No image preparation required for the coreos.
I090307:59:09.752936106114 qcow2ova.go:271] Preparation completed
I090307:59:09.752954106114 qcow2ova.go:273] Creating an OVA bundle
I090307:59:44.544617106114 qcow2ova.go:278] OVA bundle creation completed: /tmp/qcow2ova1278991043/rhcos-416-09032024.ova
I090307:59:44.544647106114 qcow2ova.go:280] Compressing an OVA file
I090308:00:43.548466106114 qcow2ova.go:286] OVA file Compression completed
Successfully converted Qcow2 image to OVA format, find at /root/image-build/rhcos-416-09032024.ova.gz
OS root password:
Copy codeCopied!
Upload the image to IBM Cloud Object Storage using the following command.
Name of the Cloud Object Storage instance bucket (required)
-f, --file
The path to the file that needs to be uploaded (required)
-o, --cos-object-name
Name of the Cloud Object Storage object (Default: filename from --file|-f option) (optional)
-n, --cos-instance-name
Name of the Cloud Object Storage instance to be used (required if not using region)
-r, --bucket-region
Cloud Object Storage bucket region. (default "us-south") (required if not usinginstance-name`)
For more options, run the following command:
pvsadm image upload –help
Copy codeCopied!
Sample output when uploading RHEL OVA image
pvsadm image upload --bucket ocp4-images-bucket --file rhel-94-09032024.ova.gz --cos-instance-name ocp4-on-power
I080906:10:00.17492161654 upload.go:152] Found bucket ocp4-images-bucket in the ocp4-on-power instance
E080906:10:01.98684461654 s3client.go:190] object rhel-94-09032024.ova.gz not found in ocp4-images-bucket bucket
I080906:10:01.98688161654 s3client.go:269] uploading the file rhel-94-09032024.ova.gz
Uploading: Total read(bytes):1076564776 progress:100%
I080908:09:12.77920361654 s3client.go:306] Upload completed successfully in 60.074163 seconds to location https://s3.us-south.cloud-object-storage.appdomain.cloud/ocp4-images-bucket/rhel-94-09032024.ova.gz
Copy codeCopied!
Sample output when uploading Red Hat Enterprise Linux CoreOS OVA image
pvsadm image upload --bucket ocp4-images-bucket --file rhcos-416-09032024.ova.gz --bucket-region us-south
I090605:02:57.574755158269 upload.go:152] Found bucket ocp4-images-bucket in the ocp4-on-power instance
E090605:02:59.109159158269 s3client.go:190] object rhcos-416-09032024.ova.gz not found in ocp4-images-bucket bucket
I090605:02:59.109172158269 s3client.go:269] uploading the file rhcos-416-09032024.ova.gz
Uploading: Total read(bytes):2710002034 progress:100%
I090605:04:14.336598158269 s3client.go:306] Upload completed successfully in 75.227130 seconds to location https://s3.us-south.cloud-object-storage.appdomain.cloud/ocp4-images-bucket/rhcos-416-09032024.ova.gz
Copy codeCopied!
Import the image into the Power Virtual Server instances.
As a best practice please name the image using the following pattern <distro>-<xy>-<timestamp>, where distro is either rhel, centos or rhcos and xy is the release version such as 94(for 9.4), 416(for 4.16) and timestamp is of the format - ddmmyyyy or mmddyyyy. Take a look at the values of the pvs-image-name argument in the examples below for concrete examples.
Name of the Power Virtual Server instance (required)
--pvs-image-name
Name of the Power Virtual Server imported image (required)
--object
Cloud storage image file name(required)
-b,--bucket
Cloud storage bucket name (required)
-r,--bucket-region
Cloud storage bucket region (required)
For more options, run the following command:
pvsadm image import –help
Copy codeCopied!
Sample output
pvsadm image import --workspace-name rdr-ocp-cicd-toronto01 -b ocp4-images-bucket --object rhel-94-09032024.ova.gz --pvs-image-name rhel-94-09032024 --bucket-region us-south
I090605:55:38.223239159478 import.go:187] Importing image rhel-94-09032024. Please wait...
I090605:57:50.201147159478 import.go:206] Image import is in-progress, current state: runningI090605:59:49.993668159478 import.go:206] Image import is in-progress, current state: runningI090606:01:49.983638159478 import.go:206] Image import is in-progress, current state: runningI090606:03:50.269742159478 import.go:206] Image import is in-progress, current state: runningI090606:05:49.954124159478 import.go:200] Image imported successfully, took 10m3.304806294s
I090606:05:52.005719159478 import.go:224] Image import for rhel-94-09032024 is currently in active state, Please check the progress in the IBM cloud UI
Copy codeCopied!
Note: You can check the progress of the imported image in the IBM Cloud UI.
Summary
In this tutorial, we have successfully created the RHEL and Red Hat Enterprise Linux CoreOS OVA image from the respective Qcow2 images, uploaded the images to the Cloud Object Storage instance, and imported the images in IBM Power Virtual Server. You are now all set for deploying OpenShift.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.