Start an instance export task - VM Import/Export

Start an instance export task

Important

Your instance might reboot during the export process. Ensure that you are performing this action when some downtime is acceptable.

To export your instance, use the create-instance-export-task command. The exported file is written to the specified S3 bucket in the following S3 key: prefixexport-i-xxxxxxxxxxxxxxxxx.format (for example, amzn-s3-demo-export-bucket/vms/export-i-1234567890abcdef0.ova).

aws ec2 create-instance-export-task --instance-id instance-id --target-environment vmware --export-to-s3-task file://C:\file.json

The file file.json is a JSON document that contains the required information.

{ "ContainerFormat": "ova", "DiskImageFormat": "VMDK", "S3Bucket": "amzn-s3-demo-export-bucket", "S3Prefix": "vms/" }

The following is an example response. The status shown is active, which means that the export task is in progress. The instance export is finished when the status is completed.

{ "ExportTask": { "ExportTaskId": "export-i-021345abcdef6789", "ExportToS3Task": { "ContainerFormat": "ova", "DiskImageFormat": "vmdk", "S3Bucket": "amzn-s3-demo-export-bucket", "S3Key": "vms/export-i-021345abcdef6789.ova" }, "InstanceExportDetails": { "InstanceId": "i-021345abcdef6789", "TargetEnvironment": "vmware" }, "State": "active" } }