This method describes how to import an existing Windows virtual machine into AWS by converting it into an Amazon Machine Image (AMI). The source virtual machine must be packaged as an Open Virtual Appliance (OVA) file.
Use this approach when you already have a Windows virtual machine from an on-premises environment or another cloud provider and want to use it with Amazon WorkSpaces Core in Horizon Cloud.
The process involves importing the OVA file into AWS, converting it into an AMI, and then using that AMI to create a WorkSpaces Core-compatible image. For more information about the AWS VM Import/Export process, see the AWS documentation: VM Import/Export.
Begin You Begin
Before starting this method, complete all required image preparation tasks described in Common Preparation Steps for Image Import.
Workflow Overview
Using the AWS VM Import/Export method involves the following workflow:
- Converting an OVA file into an AMI using AWS VM Import/Export
- Creating a custom WorkSpaces bundle from the imported image
- Creating a WorkSpace from the custom bundle
- Installing and configuring the Horizon Cloud Agent and agent pairing configuration
- Creating a WorkSpaces Core custom image
- Importing the custom image into Horizon cloud
Converting an OVA File to an AMI Using AWS VM Import or Export
This section describes how to convert an existing Windows virtual machine packaged as an Open virtual Appliance (OVA) into an Amazon Machine Image (AMI) by using the AWS VM Import/Export feature.
After the AMI is created, it can be used to create a WorkSpaces image for use with Horizon Cloud. For detailed background information see the AWS documentation: Import your VM as an image.
Best Practices for OVA Import
Before starting the import process, review the following best practices to help ensure a smooth and successful conversion:
-
Validate the OVA file
Ensure that the OVA file is complete and not corrupted before uploading it to AWS.
-
Verify permissions
Confirm that your AWS Identity and Access Management (IAM) user has the required permissions for Amazon S3 access and Amazon EC2 VM import tasks.
-
Optimize file size
Large OVA files take longer to upload and process. Remove unnecessary components from the virtual machine before exporting the OVA, if possible. procedure
Procedure
To import an OVA file and create an AMI, complete the following steps:
-
Upload the OVA file to an Amazon S3 bucket.
Upload the OVA file to an S3 bucket in your AWS account. The upload duration depends on the size of the file.
Example using the AWS CL:
aws s3 cp your-file.ovas3://your-bucket-name/After the upload completes, note the S3 URI of the file, for example:
s3://your-bucket-name/your-file.ova -
Create a JSON file to define the import configuration.
Create a file named containers.json locally with the following content:
[ { “Description”: “My Server OVA”, “Format”: “ova”, “Url”: “s3://your-bucket-name/your-file.ova” } ]Save the JSON file (for example, container.json) and note its full path.
-
Run the AWS command to create an image.
Execute the following command in your terminal, ensuring you specify the correct path to the JSON file:
aws ec2 import-image –description “My server VM” –disk-containers“file://C:\path\to\containers.json” -
Monitor the AWS create image progress .
To track the import progress:
-
Copy the Import Task ID returned after you run the import command.
-
Use the following command, replacing import-task-id with your actual ID:
aws ec2 import-image –description “My server VM” –disk-containers“file://C:\path\to\containers.json”
The process can take up to 30 minutes. Repeat this command periodically to monitor progress. When the import completes, the status shows completed, and an ImageId appears.
-
-
Access and deploy the imported AMI.
After the import is successful, the AMI is stored in the My AMIs section of your AWS account.
- Log in to the AWS Management Console.
- Navigate to EC2 > AMIs.
- Locate your imported AMI under the My AMIs tab.
- Navigate to the Amazon WorkSpaces console and confirm that the newly created image appears.
Next Steps
After the AMI is created, continue with Method 2 to complete the WorkSpaces Core image workflow: Method 2: Import Using Amazon workSpaces Core Custom Image.
This method covers:
- Creating a custom WorkSpaces bundle from the imported image
- Creating a WorkSpace from the custom bundle
- Installing and configuring the Horizon Cloud Agent and agent pairing configuration
- Creating a WorkSpaces Core custom image
- Importing the custom image into Horizon cloud
Was this page helpful?