Migrate Between OCI and Private Cloud Appliance

Private Cloud Appliance X9-2 is highly compatible with OCI, which simplifies the migration process between these systems. This section describes how to migrate from OCI to PCA, or from PCA to OCI.

Import from OCI to Private Cloud Appliance

Follow these steps to migrate your workloads from OCI to Private Cloud Appliance

Before exporting your image from OCI, you must clean the cloud-init /var/lib/cloud confiuration on a clone of the instance so that the instance is treated as new the next time it boots. Run $ sudo cloud-init clean.

  1. In the OCI console, select the instance, click More Actions, and then Create Custom Image.
    The image is created.
  2. Navigate to your list of images, select that image, and click Export and the name of the object bucket you want to use.
    Wait for the object export to complete.
  3. Download the file. Once the object export is finished, click the bucket you exported the image to and click Download. Rename it to have a .oci extension if you didn't specify that in the download step. You will need the following information:
    • Namespace
    • Bucket Name
    • Object Name
    You can use the following command to gather this information:
    oci os object get \
     --namespace-name object_storage_namespace \
     --bucket-name bucket_name \
     --name object_name \
     --file file_location
  4. Once you have downloaded the file you need to make two changes to the image_metadata.json file. Extract the file, edit image_metadata.json using an ASCII text editor such as vi, pluma, gedit or Notepad, and set the value false for the variables pvEncryptionInTransitEnabled and consistentVolumeNamingEnabled.
  5. Re-create the .oci file using the tar command.
    For example:
    tar zcvf myimage.oci image_metadata.json output.QCOW2
  6. Directly import the .oci file into PCA using the browser interface or command line. No further transformation is required.

Import from Private Cloud Appliance to OCI

Follow these steps to migrate your workloads from Private Cloud Appliance to OCI.

Before exporting your image from Private Cloud Appliance, you must clean the cloud-init /var/lib/cloud confiuration on your running OCI instance so that the instance is treated as new the next time it boots. Run $ sudo cloud-init clean.

  1. Shut down the instance you want to export. In the PCA console, select the instance and click Controls and then Stop.
  2. Create a custom image. Click Controls, and then Create Custom Image. In the dialog that opens, click Create Custom Image.
    The image is created. Wait for the custom image to show in an Available state.
  3. When the custom image is available, select it. Click Controls and then Export Image.
    A dialog opens. You have the option of exporting the image to either a bucket inside the system, or to an Object Storage URL.
  4. Select an Object Bucket that you created previously on the Private Cloud Appliance X9-2 instance. Give the object you're creating a name, and then click Export.
    Wait for the object export to complete.
  5. Download the file. Once the object export is finished, click the bucket you exported the image to and click Download. You will need the following information:
    • Namespace
    • Bucket Name
    • Object Name
    If using the OCI CLI installed on the Private Cloud Appliance, you can use the following command to gather this information:
    oci os object get \
     --namespace-name object_storage_namespace \
     --bucket-name bucket_name \
     --name object_name \
     --file file_location
  6. Log into OCI, navigate to Object Storage, select Buckets, and select the bucket you used for this procedure.
  7. Click Objects, then Upload, and then specify the path to the .oci file.
    The image is uploaded.
  8. Once the file has been uploaded you can import it as a custom image into OCI. Navigate to Compute, select Custom Images, and select Import. Point to the bucket you used, and select OCI as the file type.