copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-10-21 |
image catalog, virtual machine capture, cos bucket, export virtual machine, ova |
power-iaas |
{{site.data.keyword.attribute-definition-list}}
{: #capturing-exporting-vm}
{{site.data.keyword.off-prem-fname}}: [{{site.data.keyword.off-prem}}]{: tag-blue}
{{site.data.keyword.on-prem-fname}}: [{{site.data.keyword.on-prem}}]{: tag-red}
You can capture and export an AIX or IBM i VM instance by using the {{site.data.keyword.powerSysFull}} user interface or CLI. A VM is captured as a volume-backed image. The image is stored in new volumes on the storage providers. An image can be exported to an IBM Cloud Object Storage (Cloud Object Storage) bucket. When an image is exported, the volumes of the image are copied and packaged in an Open Virtualization Appliance (OVA) file. The OVA file is compressed by using gzip before it gets uploaded to the IBM Cloud Object Storage bucket. {: shortdesc}
When you capture and export a VM, you can choose the image catalog, Cloud Object Storage, or both as destinations. The image catalog is on the IBM Power storage area network (SAN). IBM Cloud Object Storage is encrypted and dispersed across multiple geographic locations, and accessed over HTTP by using a REST API. This service uses the distributed storage technologies that are provided by the IBM Cloud Object Storage System (formerly Cleversafe). You can always export your image in your image catalog to Cloud Object Storage at a later point. You can also deploy the captured image to create a clone of the VM by using a different network configuration.
The {{site.data.keyword.powerSysFull}} Job feature tracks long-running asynchronous operations like VM capture, image export, and image import across multiple workspaces in your cloud account. See the following APIs and CLIs that are associated to these tasks:
- API for VM capture - Capture a PVM instance and create a deployable image (version 2).
- API for image export - Add an image export job to the jobs queue (version 2).
- CLI for instance capture -
ibmcloud pi instance-capture
command. - CLI for jobs -
ibmcloud pi jobs
command.
The VM capture, image export, and image import features are restricted to one operation at a time per {{site.data.keyword.powerSys_notm}} workspace. If one of these operations is submitted successfully, then another new operation (VM Capture, Image Export, and Image Import) cannot be submitted until the previous operation is complete. {: important}
You are charged different rates based on whether you export to the image catalog or Cloud Object Storage. {: note}
Before you capture an IBM i VM, ensure that any buffer I/O memory is flushed (written) to the disk by running the following command:
CHGASPACT OPTION(*FRCWRT)
{: codeblock}
{: #console-capture-export}
Complete the following steps to capture and export a virtual server instance:
-
Open the Virtual server instances page from the IBM Cloud console. Ensure you select a workspace if you do not see any virtual server instances.
-
Click the virtual server that you want to capture.
-
On the virtual server details page, click options menu (3 vertical dots) and click Capture and export.
-
Choose the volumes that you want to capture and export.
-
Select whether you want to export the volume-backed image to the image catalog, Cloud Object Storage, or both.
-
Give your captured image a Name.
-
(Optional) If you decide to export to Cloud Object Storage, you are presented with more options:
-
Select the Region.
-
Select your Bucket name and optional folders.
-
Provide your HMAC access and HMAC secret keys.
-
Select the Generate checksum file toggle button to generate a checksum file. A checksum file is created and placed in the IBM Cloud Object Storage bucket along with the exported image. The checksum file name is based on the name of the image file and has the file extension
.sha256
. Use the commandshasum -a 256
to ensure that the copied file is correct.If you are creating your own image, you can create a checksum image and place it with your own image in the same bucket. One of the ways to generate the checksum image is by using the command
shasum -a 256 <filename>
orsha256sum <filename>
.Generating a checksum file might add extra time to the image capture and export process. {: note}
-
-
Click Export.
-
If the capture and export operation is successful, you are presented with a confirmation message.
If you select large volumes, the export process can take a significantly long time. {: important}
-
Find your newly exported image by completing either one of the following tasks:
-
If you chose to capture and export your volume-backed image to Cloud Object Storage, go to your Cloud Object Storage bucket.
-
If you chose to capture and export your volume-backed image to the image catalog, go to Boot images.
- (Optional) If you'd like to export your volume-backed image from your image catalog to Cloud Object Storage, select it, and click the Capture and export icon.
{: #cli-capture-export}
To learn more about using the command-line interface to capture and export a VM, see {{site.data.keyword.powerSysFull}} CLI Reference and IBM COS CLI.
-
To capture an AIX or IBM i VM, use the
ibmcloud pi instance-capture
command. You can export it to your image catalog, Cloud Object Storage, or both.ibmcloud pi instance-capture INSTANCE_ID --destination DEST --name NAME [--volumes "VOLUME1 VOLUME2"] [--access-key KEY] [--secret-key KEY] [--region REGION] [--image-path TYPE]
{: codeblock}
-
Find your newly exported image by completing either one of the following tasks:
-
To see your newly exported image in the image catalog, use the
ibmcloud pi image-list-catalog
command:ibmcloud pi image-list-catalog [--long] [--json]
{: codeblock}
-
To see your newly exported image in Cloud Object Storage, use the
ibmcloud cos list-objects
command:ibmcloud cos list-objects --bucket BUCKET_NAME [--delimiter DELIMITER] [--encoding-type METHOD] [--prefix PREFIX] [--starting-token TOKEN] [--page-size SIZE] [--max-items NUMBER] [--region REGION] [--json]
{: codeblock}
-