Import your VM as an image
After exporting your VM from your virtualization environment, you can import it to Amazon EC2 using VM Import/Export. The import process is the same regardless of the origin of the VM.
Prerequisites for importing a VM into Amazon EC2
-
Create an Amazon Simple Storage Service (Amazon S3) bucket for storing the exported images or choose an existing bucket. The bucket must be in the Region where you want to import your VMs. For more information about S3 buckets, see the Amazon Simple Storage Service User Guide.
-
Create an IAM role named
vmimport
. For more information, see Required service role. -
If you have not already installed the AWS CLI on the computer you'll use to run the import commands, see the AWS Command Line Interface User Guide.
Tip
In supported AWS Regions, you can also use AWS CloudShell for a browser-based, pre-authenticated shell that launches directly from the AWS Management Console.
Upload the image to Amazon S3
Upload your VM image file to your S3 bucket using the upload tool of your choice. For information about uploading objects through the Amazon S3 console, see Uploading Objects.
Import the VM
After you upload your VM image file to Amazon S3, you can use the AWS CLI to import the image. These tools accept either the S3 bucket and path to the file or a URL for a public Amazon S3 file. Private Amazon S3 files require a presigned URL.
You can also use the Import virtual machine images to AWS
template in the Migration Hub
Orchestrator
Important
-
AWS VM Import/Export strongly recommends specifying a value for either the
--license-type
or--usage-operation
parameter when you create a new VM Import task. This ensures your operating system is licensed appropriately and your billing is optimized. For more information, see Licensing for your imported VMs. -
AWS VM Import/Export only supports images that were natively installed inside the source VM and not those created using a physical-to-virtual (P2V) conversion process. For more information, see the VM Import/Export Requirements.
Examples
Example 1: Import an image using an OVA file
Example 2: Import an image with multiple disks
Example 3: Import with the encrypted option enabled
The CMK provided for encryption must not be disabled during the entire import process. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.