When you export your VM from its virtualization environment, that process creates a set of one or more disk container files that act as snapshots of your VM’s environment, settings, and data. You can use these files to import your VM, and use it as the base image for your image recipes.
Image Builder supports the following file formats for your VM disk containers:
-
Open Virtualization Archive (OVA)
-
Virtual Machine Disk (VMDK)
-
Virtual Hard Disk (VHD/VHDX)
-
Raw
The import uses the disks to create an Amazon Machine Image (AMI) and an Image Builder image resource, either of which can serve as the base image for your custom image recipe. The VM disks must be stored in S3 buckets for the import. Alternatively, you can import from an existing EBS snapshot.
In the Image Builder console, you can import the image directly, and then use the output image or AMI in your recipes, or you can specify import parameters when you are creating your recipe or recipe version. For more information about importing as part of your image recipe, see VM import configuration.
Import a VM into Image Builder
Image Builder integrates with the Amazon EC2 VM Import/Export API to enable the import process to run asynchronously in the background. Image Builder references the task ID from the VM import to track its progress, and creates an Image Builder image resource as output. This allows you to reference the Image Builder image resource in your recipes before the VM import finishes.
To import a VM with the Image Builder console, follow these steps:
-
Open the EC2 Image Builder console at https://console.aws.amazon.com/imagebuilder/
. -
Choose Images from the navigation pane.
-
To open the import dialog, choose Import image.
-
Enter the following General information:
-
Specify a unique Name for your image.
-
Specify a Version for the base image. Use the following format:
major.minor.patch
.
-
-
Choose the import type: VM import.
-
Provide details for each of the following sections on the Import image page. Then choose Import image when you're done.
Base image operating system
-
Select the Image Operating System (OS) option that matches your VM OS platform.
-
Select the OS version that matches the version for your VM from the list.
VM import configuration
-
When you export your VM from its virtualization environment, that process creates a set of one or more disk container files. These act as snapshots of your VM’s environment, settings, and data. You can use these files to import your VM as the base image for your image recipe. For more information about importing VMs in Image Builder, see Import and export VM images.
To specify the location of your import source, follow these steps:
Import source
Specify the source for the first VM image disk container or snapshot to import in the Disk container 1 section.
-
Source – This can be either an S3 bucket, or an EBS snapshot.
-
Select S3 location of disk – Enter the location in Amazon S3 where your disk images are stored. To browse for the location, choose Browse S3.
-
To add a disk container, choose Add disk container.
-
-
IAM role
To associate an IAM role with your VM import configuration, select the role from the IAM role dropdown list, or choose Create new role to create a new one. If you create a new role, the IAM Roles console page opens in a separate tab.
-
Advanced settings – optional
The following settings are optional. With these settings, you can configure encryption, licensing, tags, and more for the base image that the import creates.
Base image architecture
To specify the architecture of your VM import source, select a value from the Architecture list.
Encryption
If your VM disk images are encrypted, you must provide a key to use for the import process. To specify a KMS key for the import, select a value from the Encryption (KMS key) list. The list contains KMS keys that your account has access to in the current Region.
License management
When you import a VM, the import process automatically detects the VM OS and applies the appropriate license to the base image. Depending on your OS platform, the license types are as follows:
-
License included – An appropriate AWS license for your platform is applied to your base image.
-
Bring your own license (BYOL) – Retains the license from your VM, if applicable.
To attach license configurations created with AWS License Manager to your base image, select from the License configuration name list. For more information about License Manager, see Working with AWS License Manager
Note
-
License configurations contain licensing rules based on the terms of your enterprise agreements.
-
Linux only supports BYOL licenses.
Tags (base image)
Tags use key-value pairs to assign searchable text to your Image Builder resource. To specify tags for the imported base image, enter key-value pairs using the Key and Value boxes.
To add a tag, choose Add tag. To remove a tag, choose Remove tag.
-
Distribute VM disks from your image build from the AWS CLI
You can set up distribution of supported VM disk format files to S3 buckets in target Regions as part of your regular image build process, using Image Builder distribution configurations in the AWS CLI. For more information, see Create distribution settings for output VM disks from the AWS CLI.