Transferring an AWS EC2 Instance to mCloud

Overview

This guide provides a step-by-step process for exporting an AWS EC2 instance as a VMDK (VMware disk format) for transfer to the Micron21 mCloud platform.

📌 Note: This guide performs all steps using the AWS root account.


Prerequisites

Before proceeding with the export, ensure that your EC2 instance meets AWS export requirements.


Check EC2 Instance Eligibility

AWS imposes restrictions on instances that can be exported. Your EC2 instance must meet the following criteria:

  • The instance must have been imported initially into AWS (i.e., it cannot be an Amazon-provided AMI) or a custom AMI.

  • Amazon EBS encryption must not be enabled on the instance.

  • You can't export an instance if it contains third-party software provided by AWS. For example, VM Export cannot export Windows or SQL Server instances or any instance created from an image in the AWS Marketplace.


For the full list of export requirements, refer to the AWS VMware Export Prerequisites: https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport-limits.html


Step 1: Create an S3 Bucket

To store the exported EC2 instance, you need an S3 bucket.

  1. In the S3 Dashboard, click Create Bucket.

  2. Set a Unique Bucket Name:

    1. Enter a globally unique name, e.g., my-micron21-exports

    2. Avoid spaces or uppercase letters.

  3. In Object Ownership, enable ACLs and change Object Ownership to Object writer.

  4. Uncheck Block all Public Access.

  5. Check: I acknowledge that the current setting might result in this bucket and the objects within becoming public

  6. Click Create bucket


Step 2: Grant EC2 Export Permissions

  1. In the S3 Console, click on your newly created bucket.

  2. Navigate to the Permissions tab.

  3. Scroll down to Access control list (ACL) and click Edit.

  4. Click Add grantee.

  5. Enter the correct Canonical ID for your AWS region:


Region

Canonical ID

Asia Pacific (Melbourne)

8b8ea36ab97c280aa8558c57a380353ac7712f01f82c21598afbb17e188b9ad5

AWS GovCloud (US)

af913ca13efe7a94b88392711f6cfc8aa07c9d1454d4f190a624b126733a5602

All other regions

c4d8eabf8db69dbe46bfe0e517100c554f01200b104d59cd408e777ba442a322

For more regions: https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport-prerequisites.html


  1. Grant the following permissions:

    1. Objects: Write

    2. Bucket ACL: Read


  2. Click Save changes.


Step 3: Export the EC2 Instance as a VMDK

1. Ensure permissions are set before starting the export.

2. Run the following command in AWS CLI, replacing i-xxxxxxxxxxxxxxxxx with your EC2 instance ID and your-export-bucket with your S3 bucket name:

aws ec2 create-instance-export-task \

--instance-id i-xxxxxxxxxxxxxxxxx \

--target-environment vmware \

--export-to-s3-task DiskImageFormat=VMDK,S3Bucket=your-export-bucket,S3Prefix=exported-instance/


Step 4: Monitor the Export Progress

Run the following command in AWS CLI to track the progress:

aws ec2 describe-export-tasks

Possible Statuses:

  • "active" → The export is still in progress.

  • "completed" → The VMDK file is available in S3.


Step 5: Download the Exported VMDK

Once the export is completed:

  1. Open the S3 Console.

  2. Navigate to your-export-bucket/exported-instance/.

  3. Locate the VMDK file.

  4. Click Download


Step 6: Convert the VMDK File to RAW Format (Windows)

To convert the VMDK file to RAW format using QEMU on Windows:

  1. Download QEMU for Windows from Cloudbase QEMU: https://cloudbase.it/qemu-img-windows/

  2. Open Command Prompt and navigate to the folder containing the downloaded file.

  3. Run the following command:

qemu-img.exe convert -f vmdk -O raw source-image.vmdk destination-image.img



Step 7: Upload the Image to mCloud

  1. Log in to the mCloud Dashboard.

  2. Navigate to the Project tab → Open the Compute tab → Click Images.

  3. Click Create Image.

  4. In the Create An Image dialog box, enter the following:


    1. Image Name: Enter a descriptive name.

    2. Image Description: Provide a brief summary.

    3. Image Source: Choose Image File.

    4. Format: Select Raw.

    5. Click Create Image.


After completing this step, you can create an instance using the newly uploaded image. For further details, refer to this guide: https://support.micron21.com/kb/articles/how-to-create-a-vm-instance-from-an-image-in-mcloud


Can't find what you're looking for?

Create or manage support tickets directly with Micron21

You will need to register a new account if this is the first time lodging a ticket.

If you have previous lodged a ticket either online, email or over the phone you will already have an account. Please reset your password, if you have not logged into the support portal before.

Lodge a ticket Manage existing tickets

Need to send us information securely? Use our Escrow service here

Need more advanced support?

Micron21 provides a comprehensive approach to customer care that starts with a base 24/7 support that is included free with every service we offer - there are no charges to enjoy a basic level of support with Micron21 and you are not restricted in how you contact us to receive assistance any time of day or night.

For those who require more advanced support though, our Customer Care plans and Ad-Hoc support are designed to completely remove the complexity of IT management - from taking full responsibility for your entire infrastructure or tailoring a custom approach, we have the capability and know-how.

 

If you've organised remote assistance from Micron21, click here to connect

Sign up for the Micron21 Newsletter