Exporting images

After exporting an image, you can import it to PowerVC into various storage providers, and then deploy it as a virtual machine. There are several ways that you can export images, depending on your needs.

Export an image to a backup service

If you want to export an image from a PowerVC managed storage provider to another storage provider managed by the same PowerVC, export it to a backup service. From the PowerVC user interface, open the Images page, select an image, and click Export. Export progress can be monitored under the Storage > Service Nodes tab.

When exporting an image to a backup service, the backup service stores the entire contents of the source volumes. If the volume in the backup service is fully provisioned, the backup service requires enough space to make copies of the volumes plus up to 5% more space for metadata. For example, if the volumes in the image take up 100 GB, the backup service requires about 105 GB.

Ensure that your backup directory has enough space for the export. By default, the backup service is configured with this directory: /var/opt/ibm/powervc/image-backups/.

Exported images in the backup service are not portable. That is, if you uninstall PowerVC, your backup images are not manageable by another PowerVC instance or by a new install of PowerVC on the same server. To manage backups of your images after you uninstall PowerVC, use the image export function to export the images again.
Note:
  • Exported images are not automatically deleted when PowerVC is uninstalled. If you want to delete them, you must do so manually.

    If the default Posix backup service was configured, then the folder to remove is given by the backup_posix_path property. To view this value, run the powervc-config storage backup-service posix command.

    For a swift configured backup service, it is recommended to remove the backup images before you uninstall PowerVC.

  • Images that are exported to OVA package format are portable and can be imported into any PowerVC with a supported storage provider.

Export an image to an OVA package

Follow these steps to copy an image from one PowerVC instance to another PowerVC instance:
  1. Run powervc-image export to export the image to an OVA package.
  2. Copy the OVA package to the second PowerVC instance.
  3. Log in to the second PowerVC instance and import the OVA package into an image on the second PowerVC instance.
When images are exported into an OVA package, the volumes in the image must first be copied into a file system on the PowerVC management server. Therefore, sufficient space must be available to copy all of the volumes to files in the file system and then create an uncompressed OVA package from the volumes. Generating the OVA package requires extra space of approximately 5 K plus 1 K per volume. For example, if you are exporting an image with three volumes of sizes 10 GiB, 15 GiB, and 25 GiB, and the exported OVA is on the same file system as the temporary staging (download) directory, then you will need 100.000016 GiB of free space to perform the export. That number is double the size for the volumes plus a small amount of overhead for the descriptor.

After the OVA package is created, the files that were used to create the OVA package are removed. The resulting OVA package is compressed through gzip if the --compress option was supplied to the export command. A temporary storage provider and template for that provider is registered, but then deleted when the action is complete. You might notice that the temporary provider appears in the list of providers. You can ignore this provider.

Example:
  1. Use the powervc-image list command to view the available images. This command must be run as the root user. It returns only the images that are owned by the project that the command is run from. Add the --project argument to specify a project other than ibm-default.
    # powervc-image list
    +-----------------+--------------------------------------+--------+---------+------+-------------------+--------------+-----------+------------+
    | Name            | ID                                   | Status | Volumes | Size | Description       | Architecture | OS Distro | Exportable |
    +-----------------+--------------------------------------+--------+---------+------+-------------------+--------------+-----------+------------+
    | MyDemoImage     | a918cfc2-14e2-4653-863f-40448e7c1c5d | active | 1       | 10   |                   | ppc64le      | ubuntu    | True       |
    | MyDemoImage-001 | 38ce9da6-b93c-4940-a930-43a9fb2a2a9d | active | 1       | 10   | Image-description | ppc64le      | ubuntu    | True       |
    +-----------------+--------------------------------------+--------+---------+------+-------------------+--------------+-----------+------------+
    2 managed images returned.
  2. Export the first image:
    powervc-image export --image MyDemoImage
  3. By default, the resulting OVA package is in the /var/opt/ibm/powervc/ova folder.

Run powervc-image export -h for more information about this command.

Exporting an image from VIOS connected storage

You can export an image from VIOS connected storage when you are using shared storage pool or when you have a volume and not an image to download. For instructions, see Manually importing and exporting volumes.