How to Import OVA Files into EC2?

EC2 import OVA enables seamless VM migration by converting them to AMI format. Steps include creating JSON configurations, executing AWS CLI commands, monitoring progress, and verifying AMI creation for enhanced scalability and stability.

download-icon
Free Download
for VM, OS, DB, File, NAS, etc.
dan-zeng

Updated by Dan Zeng on 2024/11/11

Table of contents
  • How to import OVA to EC2?

  • Using Vinchin for VM backup before migration

  • AWS EC2 import image OVA example FAQs

  • Conclusion

Are you looking for a robust VM backup solution? Try Vinchin Backup & Recovery!↘ Download Free Trial

In cloud computing environments, migrating existing VM workloads to AWS's Elastic Compute Cloud (EC2) is one of the common steps that enterprises and developers take to modernize. VM files are typically stored in OVA (Open Virtualization Appliance) format, a common encapsulation format that facilitates cross-platform VM migration. By importing OVA files into AWS EC2, users can rapidly deploy and manage legacy VM resources on AWS infrastructure for greater scalability, stability and security.

This article details how to import OVA files into EC2 and convert them to AMI (Amazon Machine Image) format to help users seamlessly migrate virtualized workloads from local or other platforms to an AWS environment. The process involves preparing the necessary JSON configuration files, executing the import commands using the AWS CLI (Command Line Interface) tool, monitoring the progress of the import, and confirming the image on the EC2 console. This process makes it easier for users to migrate existing virtual machines to the AWS cloud, taking full advantage of the rich features and resources offered by AWS.

How to import OVA to EC2?

Create JSON File

Create a JSON file that describes the location of the OVA file and related information. Replace the following placeholders:

[
    {
        "Description": "Okta Access Gateway",
        "Format": "ova",
        "UserBucket": {
            "S3Bucket": "my-s3-bucket",
            "S3Key": "okta-access-gateway.ova"
        }
    }
]
  • Description: description of the OVA file, e.g. “Okta Access Gateway”.

  • Format: image file format, in this case “ova”.

  • UserBucket: Path information containing the S3 storage bucket and filename.

  • S3Bucket: S3 storage bucket name, e.g. “my-s3-bucket”.

  • S3Key: path and file name of the OVA file in the S3 storage bucket, e.g. “okta-access-gateway.ova”.

  • Save this as a containers.json file.

Start Import

Use the aws ec2 import-image command to begin EC2 import ova. An example is shown below:

aws ec2 import-image --description "Okta Access Gateway" --license-type "BYOL" --disk-containers "file://~/Downloads/containers.json"

Record Task ID

After the command is executed, note down the ImportTaskId in the output. for example:

{ "ImportTaskId": "import-ami-08800a79da64acae7" }

Check Import Progress

Use the aws ec2 describe-import-image-tasks command to check the progress of the import. Replace TASK_ID with the task ID you recorded:

aws ec2 describe-import-image-tasks --import-task-ids TASK_ID

Monitor the Import Status

Keep checking the status of the import until it becomes completed, noting the ImageId in the output, for example:

{
    "ImportImageTasks": [
        {
            "Status": "completed",
            "LicenseType": "BYOL",
            "Description": "Okta Access Gateway",
            "ImageId": "ami-0c20c537e7f8dd6a5"
        }
    ]
}

Confirm the Import is Complete

In AWS console > choose Services > EC2

Choose Images > AMIs > search box to enter your previously recorded ImageId (for example, ami-0c20c537e7f8dd6a5 ).

Find and verify that an AMI matching the ImageId exists.

Using Vinchin for VM backup before migration

While migrating VMs to AWS EC2 is an effective step toward modernization, ensuring data protection and seamless recovery throughout the migration process is crucial. Vinchin Backup & Recovery is a powerful backup solution designed for virtualized environments, making it an ideal tool to protect VM data before initiating migration tasks.

Vinchin Backup & Recovery's operation is very simple, just a few simple steps. 

1. Just select VMs on the host

backup ec2 instance

2.Then select backup destination 

backup ec2 instance

3.Select strategies

backup ec2 instance

4.Finally submit the job

backup ec2 instance

Vinchin offers a 60-day free trial, allowing users to experience its functionality in real-world environments. For more information, please reach out to Vinchin directly or connect with one of our local partners.

AWS EC2 import image OVA example FAQs

Q1: Can I import an OVA file that uses non-standard virtual hardware?

A1: AWS supports a subset of the OVF 1.0 specification. If your OVA file contains non-standard virtual hardware, it may not be supported. You should review the AWS documentation for supported configurations.

Q2: Can I modify the imported AMI?

A2: Yes, you can modify the imported AMI by launching an EC2 instance from it, making changes, and then creating a new AMI from the modified instance.

Conclusion

Importing OVA files into AWS EC2 enables seamless VM migration for greater scalability and stability. This guide simplifies the process, from configuring JSON files to using AWS CLI commands, enhancing modernization with reliable cloud infrastructure and Vinchin backup support.


Share on:

Categories: Application Backup