Migrate your Applications

Import to Private Cloud Appliance

Once the disk image file is available, you can import it into PCA without further change.

Upload it from any web server that has network connectivity to the PCA management nodes. The file can be copied to an existing web server or you can create an impromptu web server using a Python command similar to the following (adjusting for port number as needed).

  • If you use Python 2.x use python -m HTTPSimpleServer 8080
  • If you use Python 3.x use python3 -m http.server 8000.

Images are imported into PCA using either the PCA Compute Enclave browser user interface (BUI) or the OCI command line interface (CLI). See the User Guide section 5.1 for a full description.

Import Using a Browser Interface

Follow these steps to import using a browser interface:

  1. Log in to the Compute Enclave.
  2. Go to the Compute Images page, and click Import Image.
  3. Enter details in the dialog window.
  4. Select Object Storage URL and enter the URL to the file containing the boot image.
  5. Specify QCOW2, which applies to either a .qcow2 file or a .oci file containing both metadata and the output.QCOW2 disk image file.
  6. Click Import image to start the import. This takes you to a page showing the status of the image, initially Importing and then Available when the import completes.

    Note:

    The user interface only has one Launch Mode: Paravirtualized. If you import a UEFI image using the browser interface it might be imported with BIOS instead of UEFI. The workaround in the PCA Release Notes 3.5.10 is to use the CLI to launch the instance and specify the launch options there. See Launch Initial Instance below.

The time needed to perform the import depends on the size of the image and the speed of the network between the Private Cloud Appliance system and the web server. The user interface is not locked during the import so you can proceed to other tasks or log off. Check on the status of the image by viewing the image's display.

Import Using OCI Command-Line Interface

If you use the OCI CLI, use a line similar to the example below, substituting in the image URL and the OCID for your tenancy.

The import command produces a display of the import work unit, and you can use a 'get' command to display its status.

$ oci compute image import from-object-uri --uri
    http://mynfs/shares/export/images/mydemo.oci --display-name "demo-image" --compartment-id
    $OCI_CLI_TENANCY 
    { 
        "data": { 
            "agent-features": null, 
            "base-image-id": null,
            "compartment-id":
    "ocid1.tenancy.AK00661530.scasg01.lk0p5dyyyrdctdo3vvb9vdgr8zvdwznk7tcqtfmvzv1xxym66oak0009014
    6", 
            "create-image-allowed": true, 
            "defined-tags": {}, 
            "display-name": 
            "demo-image",
            "freeform-tags": {}, 
            "id":
    "ocid1.image.AK00661530.scasg01.lt0xzicgaiv9plkwurk2xswia4x00e4ds2vyxa78d1xmk17b1indxamf6i4h"
    , 
            "launch-mode": "PARAVIRTUALIZED", 
            "launch-options": null, 
            "lifecycle-state": "IMPORTING", 
            "operating-system": "UNAVAILABLE", 
            "operating-system-version": "UNAVAILABLE", 
            "size-in-mbs": 0, 
            "time-created": "2022-02-03T00:41:24.982617+00:00"
        },"etag": "ae01e390-eab5-449c-b78d-c655235af23f", 
        "opc-work-request-id": "ocid1.workrequest.AK00661530.scasg01.storage1qsyui8onuv2q9evycdrnwtp13nj9l3eko37fzvhpahbobbav18r"
    }

You can view the import via the browser interface, or check in its status via the CLI, using the OCID displayed in the import image command.

$ oci compute image get --image-id
    ocid1.image.AK00661530.scasg01.lt0xzicgaiv9plkwurk2xswia4x00e4ds2vyxa78d1xmk17b1indxamf6i4h 
    {
        "data": { 
            "agent-features": null, 
            "base-image-id": null, 
            "compartment-id":
    "ocid1.tenancy.AK00661530.scasg01.lk0p5dyyyrdctdo3vvb9vdgr8zvdwznk7tcqtfmvzv1xxym66oak0009014
    6", 
            "create-image-allowed": true, 
            "defined-tags": {},  
            "display-name": "demo-image",
            "freeform-tags": {}, 
            "id":
    "ocid1.image.AK00661530.scasg01.lt0xzicgaiv9plkwurk2xswia4x00e4ds2vyxa78d1xmk17b1indxamf6i4h"
    , 
            "launch-mode": "CUSTOM", 
            "launch-options": { "boot-volume-type": "PARAVIRTUALIZED",
            "firmware": "BIOS", 
            "is-consistent-volume-naming-enabled": false,
            "is-pv-encryption-in-transit-enabled": false, 
            "network-type": "PARAVIRTUALIZED",
            "remote-data-volume-type": "PARAVIRTUALIZED" 
            },  
            "lifecycle-state": "AVAILABLE"
            "operating-system": "Fedora Linux"  
            "operating-system-version": "35"  
            "size-in-mbs": 512000  
            "time-created": "2022-02-03T00:41:24.982617+00:00  
        }  
        "etag": "d96dda18-e10b-4d87-83ab-425bb5cf582e 
    } 

Launch Initial Instance

You can launch the image without using a browser interface or a command-line interface.

Follow these instructions to launch an instance using the browser:

  1. From the page describing the image, click the Controls drop-down menu.
  2. Click Create Instance.
  3. In the dialog window, enter the details on the instance's name, fault domain, shape and virtual network and subnet.
  4. If using cloud-init, enter the public key to permit password-free ssh.

The instance will be in Provisioning state while it is being created, and then is automatically launched. After the instance is provisioned you can create a console connection to connect to the instance console.

You can also use OCI CLI with a pattern similar to this, substituting in desired values for the variables display-name, shape, source details, subnet, keys and names:

$ oci compute instance launch -c $OCI_CLI_TENANCY \
--availability-domain ad1 \
--shape VM.PCAStandard1.2 \ 
--source-details '{"boot-volume-size-ingbs":100,"imageId":"$MYIMAGEID"},"sourceType":"image"}' \
--subnet-id $MYSUBNET_OCID \
--metadata '{"ssh_authorized_keys":"ssh-rsa ...$RESTOFMYKEY myuserid@mydesktop"}' \
--display-name "myinstance" \  
--assign-public-ip true

The advantage of the CLI is that it is scriptable and can be repeated in bulk with fewer manual steps. If you need to override the launch mode or parameters, you can specify them on the command line:

$ oci compute instance launch [...] \
--launch-options '{"boot-volumetype":"PARAVIRTUALIZED", "firmware":"UEFI_64", "is-consistent-volume-namingenabled":false,"is-pv-encryption-in-transit-enabled": false, "networktype":"PARAVIRTUALIZED","remote-data-volume-type": "PARAVIRTUALIZED"}'

Add Block Volumes to Complete the Instance

Create block volumes and add them to the instance.

Previous steps created the boot environment on PCA X9-2. Review the data collected in the preparation steps to size disks that are needed to complete the image.

  1. Use the PCA Compute Enclave navigation to create block volumes and add them to the instance.
  2. Create file systems on the block volumes using the tool appropriate to the guest operating system, and copy contents from the source system.
    The approach will depend on the applications and nature of the data, so details are out of scope for this playbook.

    Note:

    Private Cloud Appliance X9-2 does not support Fibre Channel devices.
If the VM on the source system uses NFS, SMB/CIFS or iSCSI targets for its data, it may be possible to expose them to the new instance without having to create new storage resources. Permissions and iSCSI parameters may need to be changed on the storage device