PowerVC image OVA package details

PowerVC enables users to export and import OVA packages by using the powervc-image CLI.

This topic provides you the details of OVA package. OVA stands for Open Virtual Appliance package, which is a tar archive with OVF (Open Virtualization Format) file inside. OVF is an industry open standard packaging and distributing format for virtual appliances. To learn more about OVF and specifications, refer DMTF document DSP0243. The OVA package must contain a valid OVF descriptor that has sufficient information to describe the image for PowerVC. An OVF might also contain detailed deployment information. PowerVC does not import the deployment information. It imports information that is required to locate image volume files and create image. The information includes details such as image name and description, architecture, operating system type, volumes' names and data, and whether a volume is in the boot set, etc. The powervc-image export command generates an OVA with this information.

The exported OVA can be consumed by any cloud providers which supports importing OVA images. Given below is an example OVA file that is named aix-img1.ova to see the necessary fields needed for an OVF. The OVA must contain one or more volume files and an OVF file.
[root@dnd-powervc1-novalocal home] # tar -xvf aix-img1.ova
aix-img1.ovf => OVF file
volume1-2gb => volume file
volume2-10gb => volume file
This shows that aix-img1.ova is a single volume image file. These are the important fields for the image OVF.
[root@dnd-powervc1-novalocal home] # cat aix-img1.ovf
This image shows important fields for the image OVF.
Given below are some more details on important tags:
<ovf:File ovf:href="volume1-2gb" ovfid="file1" ovfsize="2147483648"/>
- ovf:href attribute contains the path name of the volume file. Relative path does not contain the dot segments.
- ovf:id is unique for each volume file.
- ovf:size is referenced in bytes, and it must exactly match with the actual size of the referenced volume file.
<ovf:OperatingSystemSection ovfid:"79">
- Specifies the guest operating system information of the image. The values for ovf:id are taken from the ValueMap of the CIM_OperatingSystem.OsType.
<ns0:architecture xmlns:ns0="ibmpvc">ppc64</ns0:architecture>
This is a special customize tag that is used to describe image architecture. Heterogeneous cloud solution providers can use this field discriminate between x86 and power images.
<ns1:boot xmlns:ns1="ibmpvc">True</ns1:boot>
- As PowerVC supports multi boot images, this option is used by multi volume images to identify boot and data volumes. If this option is not provided, all volumes are imported as boot volume by default.

Similar fields are available for an OVF file that is created by running PowerVC export.

For information about exporting via the CLI, refer to this blog: “Move images between cloud providers”.

Inside a backup node exported image OVA

When an image is exported from PowerVC, an image OVA tar file with the .ova extension is created on the backup node. The image OVA is a compressed tar file (pigz/gzip compressed) with volume backup chunk files in addition to the metadata and sha files.

Format of OVA name is given here.
<exported-image-display-name>_<image backup id>.ova

Default location is /var/opt/ibm/powervc/image-ovas.

Example
[root@backupnode-37 image-ovas]# ls
Export-Image_192.ova
On extracting an image OVA, you can see the following files.
[root@backupnode-37 image-ovas]# tar -xvf Export-Image_192.ova
DB_entries_for_image_backup_id--192.json
temp_vol_c24-bc8bcac1-ce77-4b_192.gz
Export-Image.ovf
This json file contains image and image backup DB entries and properties.
[root@backupnode-37 image-ovas]# cat DB_entries_for_image_backup_id--192.json

{
   "image_properties":{
      "os_distro":"rhel",
      "endianness":"little-endian",
      "architecture":"ppc64",
      "hypervisor_type":"phyp",
      "root_device_name":"/dev/sda",
      "bdm_v2":"true"
   },
   "192":[
      {
         "backup_id":"cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2",
         "volume_id":"c24d266d-7614-4f50-8ce7-26540a3cb85a",
         "boot_index":0,
         "size":1,
         "cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2":{
            "created_at":"2021-07-26 09:25:28+00:00",
            "updated_at":"2021-07-26 09:25:42+00:00",
            "deleted_at":null,
            "deleted":false,
            "id":"cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2",
            "user_id":"2350fc3f2355477e99436f6a4d7ce4e4",
            "project_id":"b638718b1bae4b88ba4c7aca56c5095e",
            "volume_id":"bc8bcac1-ce77-4bcc-8fde-c513cc135557",
            "host":"ip9_x_x_x",
            "availability_zone":null,
            "display_name":"Export-Image",
            "display_description":"Exporting an Image to a Backup Node.",
            "container":"Suman-Image--7c6c73e9-8e52-4b_192/temp_vol_c24-bc8bcac1-ce77-4b_192",
            "parent_id":null,
            "status":"available",
            "fail_reason":null,
            "service_metadata":"volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2",
            "service":"cinder.backup.drivers.posix.PosixBackupDriver",
            "size":1,
            "object_count":4,
            "temp_volume_id":null,
            "temp_snapshot_id":null,
            "num_dependent_backups":null,
            "snapshot_id":null,
            "data_timestamp":"2021-07-26T09:25:28.000000",
            "restore_volume_id":null,
            "encryption_key_id":null,
            "backup_metadata":[
              
            ]
         }
      }
   ]
}
The OVF file contains all properties of the image. These properties are read and used to create the new PowerVC image from the OVA file when an image is imported.
[root@backupnode-37 image-ovas]# cat Export-Image.ovf
<?xml version="1.0" encoding="UTF-8"?>
<ovf:Envelope xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ovf:References>
    <ovf:File href="temp_vol_c24-bc8bcac1-ce77-4b_192.gz" id="file1" size="1182771" compression="gzip"/>
  </ovf:References>
  <ovf:DiskSection>
    <ovf:Info>Disk Section</ovf:Info>
    <ovf:Disk capacity="1073741824" capacityAllocationUnits="byte" diskId="disk1" fileRef="file1"/>
  </ovf:DiskSection>
  <ovf:VirtualSystemCollection>
    <ovf:VirtualSystem ovf:id="vs0">
      <ovf:Name>Export-Image</ovf:Name>
      <ovf:Info></ovf:Info>
      <ovf:ProductSection>
        <ovf:Info/>
        <ovf:Product/>
      </ovf:ProductSection>
      <ovf:OperatingSystemSection ovf:id="79">
        <ovf:Info/>
        <ovf:Description>RHEL</ovf:Description>
        <ns0:architecture xmlns:ns0="ibmpvc">ppc64</ns0:architecture>
      </ovf:OperatingSystemSection>
      <ovf:VirtualHardwareSection>
        <ovf:Info>Storage resources</ovf:Info>
        <ovf:Item>
          <rasd:Description></rasd:Description>
          <rasd:ElementName>temp_vol_c24-bc8bcac1-ce77-4b_192.gz</rasd:ElementName>
          <rasd:HostResource>ovf:/disk/disk1</rasd:HostResource>
          <rasd:InstanceID>1</rasd:InstanceID>
          <rasd:ResourceType>17</rasd:ResourceType>
          <ns1:boot xmlns:ns1="ibmpvc">True</ns1:boot>
        </ovf:Item>
      </ovf:VirtualHardwareSection>
    </ovf:VirtualSystem>
    <ovf:Info/>
    <ovf:Name/>
  </ovf:VirtualSystemCollection>
</ovf:Envelope>
The tar file containing the compressed volume backup chunk file and the metadata and sha files. By default, pigz compression is used, if the ise_fast_compression is set to False in cinder.conf, the normal gzip compression is used.
[root@backupnode-37 image-ovas]# tar -xvzf temp_vol_c24-bc8bcac1-ce77-4b_192.gz
volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2-00001
volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2-00002
volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2-00003
volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2-00004
volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2_sha256file
volume_bc8bcac1-ce77-4bcc-8fde-c513cc135557_20210726092532_backup_cf9d9efd-8e81-4168-b7c5-7ab4bfe146e2_metadata