Import an OVA to OCI

Importing an image is a two step process. First, you must create a pre-authethenticated request. The pre-authententicated request URL is then used when importing an image.

To create a pre-authenticated request:

  1. Return to the Oracle Cloud Console.
  2. Navigate to Object Storage > Object Storage.
  3. On the row representing the object to be imported, click the three dots.
  4. Click Create Pre-Authenticated Request.
  5. In the Create Pre-Authenticated Request dialog box, click Create Pre-Authenticated Request.
  6. In the Pre-Authenticated Request Details dialog box, copy the URL.

To Import the OVA:

  1. In the Oracle Cloud Console, navigate to Compute > Custom Images.
  2. Click Import image.
  3. In the Import Image dialog box, enter:
    FieldValue
    NAMEAny appropriate name
    OPERATING SYSTEMLinux
    OBJECT STORAGE URLURL from prior step
  4. Click Import Image.
  5. Wait while the image is imported.

To create a pre-authenticated request:

  1. Return to the OCI command line.
  2. Create a pre-authentication request using the oci os preauth-request create command.

    Where:
    <bucketname> is the name of the bucket storing the OAG OVA.
    <name> is any name.
    <timestamp> is an RFC 3339 time stamp specifying a time in the future.
    <nameofobject> is the name of the object in the bucket.
    oci os preauth-request create -ns <name space> \
        -bn <bucketname> \
        --name "<name>"  \
        --access-type ObjectRead  \
         --time-expires <timestamp>" 
         --on <nameof bject>
    

    For example:
    oci os preauth-request create \
        -ns id732ljpics9 \
        -bn OAG-OVA-Bucket \
        --name "OAG.4.5.ova.request" \
        --access-type ObjectRead \
        --time-expires 2019-12-21T00:00:00.000+12:00 \
        -on "OAG-4.5.OVA"

    Which returns an output similar to:
    oci {
        "data": {
    . . .
        "access-uri": "/p/wYXXEpJQcwyTzS6xW_ygZvMhEQhSlRox1PDsXVzpI54/n/id732ljpics9/b/OAG-OVA-Bucket/o/OAG-4.5.OVA", 
    . . .
        "name": "OAG.4.5.ova.request",
        }
    } 
     
  3. Construct the complete URL for the request by pre-pending the request with:
    https://objectstorage.<your-regiion>.oraclecloud.com/

    Where:
    <your-region> represents the region code of the object storage bucket.

    For example:
    https://objectstorage.us-ashburn-1.oraclecloud.com/p/wYXXEpJQcwyTzS6xW_ygZvMhEQhSlRox1PDsXVzpI54/n/id732ljpics9/b/OAG-OVA-Bucket/o/OAG-4.5.OVA

To import OVA

At the time of this writing import of OVA at the command line level was not supported by Oracle Cloud Infrastructure.