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.
Creatin<strong>g</strong> OVA ima<strong>g</strong>es for Red Hat OpenShift Container Platform on IBM Power Virtual Servers - IBM Developer

Tutorial

Creating OVA images for Red Hat OpenShift Container Platform on IBM Power Virtual Servers

Create and upload OVA files as boot images for RHEL and RHCOS

By

Shilpi Das,

Sudeesh John,

Poorna gottimukkula

Introduction

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.

In addition, Red Hat Enterprise Linux CoreOS OVA images are now provided by Red Hat. For instructions on importing the appropriate pre-built Red Hat Enterprise Linux CoreOS image, refer to the blog, Import Pre-Built Red Hat Enterprise Linux CoreOS Images in to PowerVS. However, if you do need a customized image, either continue with this tutorial or follow the more scripted approach in the tutorial, Creating OVA images using a CentOS instance in IBM Power Systems Virtual Servers.

Prerequisites

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).
  • IBM Cloud API key.

Estimated time

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:

  1. Install the following packages:

    sudo dnf install -y  qemu-img cloud-utils-growpart
  2. Download the latest pvsadm helper tool from https://github.com/ppc64le-cloud/pvsadm/releases

    sudo curl -sL https://github.com/ppc64le-cloud/pvsadm/releases/download/v0.1.15/pvsadm-linux-ppc64le -o /usr/local/bin/pvsadm
    sudo chmod +x /usr/local/bin/pvsadm
    pvsadm version
    pvsadm image –help
  3. Download the Qcow2 images.

    Download the RHEL (or CentOS) and Red Hat Enterprise Linux CoreOS Qcow2 images.

    DistroLocation
    RHEL 9.4 (download the KVM guest image)https://access.redhat.com/downloads/content/279/ver=/rhel---9/9.4/ppc64le/product-software
    CentOS Stream 9https://cloud.centos.org/centos/9-stream/ppc64le/images/CentOS-Stream-genericCloud-9-latest.ppc64le.qcow2
    Red Hat Enterprise Linux CoreOS 4.12https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.12/latest/rhcos-openstack.ppc64le.qcow2.gz
    Red Hat Enterprise Linux CoreOS 4.13 https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.13/latest/rhcos-openstack.ppc64le.qcow2.gz
    Red Hat Enterprise Linux CoreOS 4.14 https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.14/latest/rhcos-openstack.ppc64le.qcow2.gz
    Red Hat Enterprise Linux CoreOS 4.15 https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.15/latest/rhcos-openstack.ppc64le.qcow2.gz
    Red Hat Enterprise Linux CoreOS 4.16 https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.16/latest/rhcos-openstack.ppc64le.qcow2.gz

    Note:

    • Although the RHEL image is named as KVM guest image, it works for both KVM and IBM PowerVM® systems.
    • The pvsadm tool supports only official RHEL/CentOS cloud images and Red Hat Enterprise Linux CoreOS images.
  4. Convert the Qcow2 image to OVA format.

    Run the pvsadm command in the given format:

    pvsadm image qcow2ova  --image-name <image-name&gt; --image-url  <image-url&gt; --image-dist <image-dist&gt; --image-size <size-of-image&gt; --rhn-user <rhel-user&gt; --rhn-password <rhel-password&gt; --os-password <os-password&gt; --temp-dir <temp-directory&gt;

    Examples:

    pvsadm image qcow2ova  --image-name rhel-94-09032024 --image-url  ./rhel-9.4-ppc64le-kvm.qcow2.gz --image-dist rhel --image-size 11 --rhn-user john@example.com --rhn-password someValidPassword --os-password sOmeComplexpassword
    pvsadm image qcow2ova  --image-name rhel-94-09032024 --image-url  ./rhel-9.4-ppc64le-kvm.qcow2.gz --image-dist rhel --image-size 11 --rhn-user john@example.com --rhn-password someValidPassword –-skip-os-password
    pvsadm image qcow2ova  --image-name centos-stream-9-09032024 --image-url ./CentOS-Stream-genericCloud-9-20240819.0.ppc64le.qcow2 --image-dist centos --image-size 11 --os-password sOmeComplexpassword
    pvsadm image qcow2ova  --image-name rhcos-416-09032024 --image-url  ./rhcos-4.16.0-ppc64le-openstack.ppc64le.qcow2.gz --image-dist coreos --image-size 16

    The following table describes the parameters used in the command to convert a Qcow2 image to the OVA format.

    ParameterDescription
    --image-name Name of the resultant image (required)
    --image-urlURL or absolute local file path to the .gz image (required)
    --image-distImage distribution (supported: rhel, centos, coreos) (required)
    --image-sizeSize (in gB) of the resultant OVA image (default 11) (optional)
    --target-disk-sizeSize (in gB) of the target disk volume where OVA will be copied (default 120) (optional)
    --rhn-userRed Hat subscription username. Required when image distribution is rhel
    --rhn-passwordRed Hat subscription password. Required when image distribution is rhel
    --os-passwordRoot user password. Will auto-generate the 12-bit password (applicable only for Red Hat and CentOS distributions) (optional)
    --skip-os-passwordSkip the root user password (optional)
    -t, --temp-dirScratch space to use for OVA generation (default "/tmp") (optional)

    For more options, run the following command:

    pvsadm image qcow2ova –help

    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 log           bsize=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
    Registering to: 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
    generating grub configuration file ...
    Adding boot menu entry for UEFI Firmware Settings ...
    done
    Unregistering from: 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

    Sample Red Hat Enterprise Linux CoreOS output

    I0903 07:58:43.304035  106114 validate.go:40] Checking: platform
    I0903 07:58:43.304089  106114 validate.go:40] Checking: user
    I0903 07:58:43.304103  106114 validate.go:40] Checking: image-name
    I0903 07:58:43.304116  106114 validate.go:40] Checking: tools
    I0903 07:58:43.304160  106114 tools.go:43] qemu-img found at /usr/bin/qemu-img
    I0903 07:58:43.304196  106114 tools.go:43] growpart found at /usr/bin/growpart
    I0903 07:58:43.304208  106114 validate.go:40] Checking: diskspace
    I0903 07:58:43.304224  106114 diskspace.go:50] free: 67g, need: 66g
    I0903 07:59:02.524102  106114 qcow2ova.go:252] Converting Qcow2(/tmp/qcow2ova1278991043/disk.qcow2) image to raw(/tmp/qcow2ova1278991043/ova-img-dir/rhcos-416-09032024-disk.raw) format
    I0903 07:59:04.872828  106114 qcow2ova.go:257] Conversion completed
    I0903 07:59:04.872861  106114 qcow2ova.go:259] Resizing the image /tmp/qcow2ova1278991043/ova-img-dir/rhcos-416-09032024-disk.raw to 16g
    Image resized.
    I0903 07:59:09.752865  106114 qcow2ova.go:264] Resize completed
    I0903 07:59:09.752898  106114 qcow2ova.go:266] Preparing the image
    I0903 07:59:09.752916  106114 prepare.go:182] No image preparation required for the coreos.
    I0903 07:59:09.752936  106114 qcow2ova.go:271] Preparation completed
    I0903 07:59:09.752954  106114 qcow2ova.go:273] Creating an OVA bundle
    I0903 07:59:44.544617  106114 qcow2ova.go:278] OVA bundle creation completed: /tmp/qcow2ova1278991043/rhcos-416-09032024.ova
    I0903 07:59:44.544647  106114 qcow2ova.go:280] Compressing an OVA file
    I0903 08:00:43.548466  106114 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:
  5. Upload the image to IBM Cloud Object Storage using the following command.

    export IBMCLOUD_API_KEY=<IBM_CLOUD_API_KEY&gt;
    pvsadm image upload  --bucket <bucket-name&gt; --file <image-name&gt;.ova.gz --cos-instance-name <cos-instance-name&gt;

    Example:

    pvsadm image upload --bucket ocp4-images-bucket --file rhel-94-09032024.ova.gz --cos-instance-name ocp4-on-power

    Where:

    ParameterDescription
    -b, --bucketName of the Cloud Object Storage instance bucket (required)
    -f, --fileThe path to the file that needs to be uploaded (required)
    -o, --cos-object-nameName of the Cloud Object Storage object (Default: filename from --file|-f option) (optional)
    -n, --cos-instance-nameName of the Cloud Object Storage instance to be used (required if not using region)
    -r, --bucket-regionCloud Object Storage bucket region. (default "us-south") (required if not using instance-name`)

    For more options, run the following command:

    pvsadm image upload –help

    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
    I0809 06:10:00.174921   61654 upload.go:152] Found bucket ocp4-images-bucket in the ocp4-on-power instance
    E0809 06:10:01.986844   61654 s3client.go:190] object rhel-94-09032024.ova.gz not found in ocp4-images-bucket bucket
    I0809 06:10:01.986881   61654 s3client.go:269] uploading the file rhel-94-09032024.ova.gz
    Uploading: Total read(bytes):1076564776    progress:100%
    I0809 08:09:12.779203   61654 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

    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
    I0906 05:02:57.574755  158269 upload.go:152] Found bucket ocp4-images-bucket in the ocp4-on-power instance
    E0906 05:02:59.109159  158269 s3client.go:190] object rhcos-416-09032024.ova.gz not found in ocp4-images-bucket bucket
    I0906 05:02:59.109172  158269 s3client.go:269] uploading the file rhcos-416-09032024.ova.gz
    Uploading: Total read(bytes):2710002034    progress:100%
    I0906 05:04:14.336598  158269 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
  6. Import the image into the Power Virtual Server instances.

    As a best practice please name the image using the following pattern <distro&gt;-<xy&gt;-<timestamp&gt;, 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.

    Run the following command:

    export IBMCLOUD_API_KEY=<IBM_CLOUD_API_KEY&gt;
    pvsadm image import --workspace-name <instance-name&gt; --bucket <bucket-name&gt; --object <object-name&gt; --pvs-image-name <image-name&gt; --bucket-region <region&gt;

    Example:

    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
    pvsadm image import --workspace-name rdr-ocp-cicd-toronto01 -b ocp4-images-bucket --object rhcos-416-09032024.ova.gz --pvs-image-name rhcos-416-09032024 --bucket-region us-south

    Where:

    ParameterDescription
    -n, --workspace-nameName of the Power Virtual Server instance (required)
    --pvs-image-name Name of the Power Virtual Server imported image (required)
    --objectCloud storage image file name(required)
    -b,--bucketCloud storage bucket name (required)
    -r,--bucket-regionCloud storage bucket region (required)

    For more options, run the following command:

    pvsadm image import –help

    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 
    I0906 05:55:38.223239  159478 import.go:187] Importing image rhel-94-09032024. Please wait...
    I0906 05:57:50.201147  159478 import.go:206] Image import is in-progress, current state: running
    I0906 05:59:49.993668  159478 import.go:206] Image import is in-progress, current state: running
    I0906 06:01:49.983638  159478 import.go:206] Image import is in-progress, current state: running
    I0906 06:03:50.269742  159478 import.go:206] Image import is in-progress, current state: running
    I0906 06:05:49.954124  159478 import.go:200] Image imported successfully, took 10m3.304806294s
    I0906 06:05:52.005719  159478 import.go:224] Image import for rhel-94-09032024 is currently in active state, Please check the progress in the IBM cloud UI

    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.