To export the virtual machine, the Amazon EC2 CLI (documentation) must be installed.
To store the unloaded machine you need to create an Amazon S3 bucket:
- Open the Amazon S3 console.
- Choose Create Bucket.
- In the Create Bucket dialog window, enter a name for your bucket. The name should be unique among all existing buckets in Amazon S3. In the Region field, enter the region.
- Create a bucket.
To export the virtual machine, use the command:
ec2-create-instance-export-task instance_id -e target_environment - f disk_image_format -c container_format -b s3_bucket
instance_id - ID of the virtual machine;
target_environment - the destination (vmware);
disk_image_format - disk format (vmdk for VMware, vhd for Microsoft Hyper-V and Citrix Xen);
container_format - target file format (for VMware - ova);
s3_bucket - the name of the target basket.
An example:
ec2-create-instance-export-task i-78e485d8 -e vmware -f vmdk -c ova - b mybucket
In case of an error where the system cannot find the server, change the value EC2_URL.
Linux:
export EC2_URL=https://<service_endpoint>
For example:
export EC2_URL=https://ec2.us-west-2.amazonaws.com
Windows:
Click the Start button, right-click Computer, and select Properties. Then select Advanced System Settings -> Environment Variables. In the Custom Variables section, click Create. In the Variable name field, enter EC2_URL. In the Value field - https://<service_endpoint>.
Have you tried Virtual cloud servers by Cloud4Y? Not yet?
Leave a request and get a 10-day free trial.