Migrate From On Premises
To migrate from on premises deployments, first import to Private Cloud Appliance, then launch the instance, and then add block volumes to complete the instance.
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:
- Log in to the Compute Enclave.
- Go to the Compute Images page, and click Import Image.
- Enter details in the dialog window.
- Select Object Storage URL and enter the URL to the file containing the boot image.
- Specify QCOW2, which applies to either a
.qcow2
file or a.oci
file containing both metadata and theoutput.QCOW2
disk image file. - 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
}
Import vmdk
or qcow2
File Using CLI, Without oci
File
Private Cloud
Appliance supports .vmdk
and .qcow2
file types, so you can import them directly without creating a .oci
file.
-- source-image-type VMDK
or --source-image-type QCOW2
. Oracle recommends creating the .oci
file as described in the previous topic, but this approach is supported. For example:
$ oci compute image import from-object-uri --uri http://mywebsever/images/myimage.vmdk -- display-name "myimage" --compartment-id $OCI_CLI_TENANCY --source-image-type VMDK
{
"data": {
"agent-features": null,
"base-image-id": null,
"compartment-id": "ocid1.tenancy.AK00661530.scasg01.lk0p5dyyyrdctdo3vvb9vdgr8zvdwznk7tcqtfmvzv1xxym66oak00090146",
"create-image-allowed": true,
"defined-tags": {},
"display-name": "myimage",
"freeform-tags": {},
"id": "ocid1.image.AK00661530.scasg01.sn6x8ba80rhymybtfiv6wkyeyy5fuubvhpb9mba8ofzscfpinsopq6eg4nf4",
"launch-mode": "PARAVIRTUALIZED",
"launch-options": null,
"lifecycle-state": "IMPORTING",
"operating-system": "UNAVAILABLE",
"operating-system-version": "UNAVAILABLE",
"size-in-mbs": 0,
"time-created": "2022-02-03T01:31:12.529239+00:00" },
"etag": "fa3c71ec-004b-4907-8952-828904b69aac",
"opc-work-request-id": "ocid1.workrequest.AK00661530.scasg01.storageiodkxug2l436mp84gz5x5meeqw2w00l6c6ftijx44998p1kmda23"
}
$ oci compute image get --image-id ocid1.image.AK00661530.scasg01.sn6x8ba80rhymybtfiv6wkyeyy5fuubvhpb9mba8ofzscfpinsopq6eg4nf4
{
"data": {
"agent-features": null,
"base-image-id": null,
"compartment-id": "ocid1.tenancy.AK00661530.scasg01.lk0p5dyyyrdctdo3vvb9vdgr8zvdwznk7tcqtfmvzv1xxym66oak00090146",
"create-image-allowed": true,
"defined-tags": {},
"display-name": "myimage",
"freeform-tags": {},
"id": "ocid1.image.AK00661530.scasg01.sn6x8ba80rhymybtfiv6wkyeyy5fuubvhpb9mba8ofzscfpinsopq6eg4nf4",
"launch-mode": "PARAVIRTUALIZED",
"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": "CUSTOM",
"operating-system-version": "CUSTOM",
"size-in-mbs": 512000,
"time-created": "2022-02-03T01:31:12.529239+00:00"
}, "etag": "6564352c-4fea-4335-bad4-b6c9efeb05cd"
}
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:
- From the page describing the image, click the Controls drop-down menu.
- Click Create Instance.
- In the dialog window, enter the details on the instance's name, fault domain, shape and virtual network and subnet.
- If using
cloud-init
, enter the public key to permit password-freessh
.
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.