Import an OVA to AWS

Import the OVA using previously created roles.

Info

Note

AWS requires the use of the vmimport comand to import a VM.

There is no AWS Console equivalent to the command line vmimport command.

Using the vmimport identity to convert the OVA image to an AMI image:

  1. Create a json file representing the locations for the containers used during the import.
    [
        {
            "Description": "DESCRIPTION",
            "Format": "ova",
            "UserBucket": {
                "S3Bucket": "BUCKET_NAME",
                "S3Key": "FILE_NAME"
            }
        }
    ]
    containers.json

    Replacing:
    BUCKET_NAME with the bucket name. For example "access-gateway-bucket".
    DESCRIPTION with an appropriate description. For example, "Okta Access Gateway".
    FILE_NAME with the specific name of the OVA file. For example "Okta-AccessGateway.ova".

  2. Begin the import process using a command similar to: :
    aws ec2 import-image --description "Okta Access Gateway" --license-type "BYOL" --disk-containers "file://~/Downloads/containers.json" 
  3. Examine the output of command and note the task id associated with the import process.

    {
    	"Status": "active", 
    	"LicenseType": "BYOL", 
    	"Description": "AG2019.ova.", 
    	"SnapshotDetails": [...], 
    	"Progress": "2", 
    	"StatusMessage": "pending", 
    	    "ImportTaskId": "import-ami-08800a79da64acae7"
    }
    

  4. Examine the progress of the import using the task id
    aws ec2 describe-import-image-tasks --import-task-ids TASK_ID
    Where task id is the value from the prior step. For example:
    aws ec2 describe-import-image-tasks --import-task-ids import-ami-08800a79da64acae7

    Import progress is noted in the Progress json element and represents a percentage from 0-100%.

    1. Monitor the import until it reaches status completed. For example:

      {
          "ImportImageTasks": [
      	{
      		"Status": "completed", 
      		"LicenseType": "BYOL", 
      		"Description": "AG2019.ova.",
      		ImageId": "ami-0c20c537e7f8dd6a5"
      }

      Note the ImageId field, it will be used to confirm the image import in the AWS console.

  5. Confirm that the import completed in the AWS console

    1. Return to the AWS console

    2. Navigate to Services > EC2.

    3. In the left hand navigation pane select Images > AMI.

    4. Examine the image list, searching for the image with matching id.


      AWS AMI Image list

Related topics

  • For more information on uploading files to S3 buckets see Putting an Object into an S3 bucket in the Amazon Web Services documentation.
  • For more information on the AWS S3 cp command see S3 cp command in the Amazon Web Service documentation