Skip to content

Instantly share code, notes, and snippets.

@abdennour
Created February 26, 2019 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdennour/9f756c00969bc7848fa36ed70b842c03 to your computer and use it in GitHub Desktop.
Save abdennour/9f756c00969bc7848fa36ed70b842c03 to your computer and use it in GitHub Desktop.
Export AWS EC2 instance to a standard VM file format - ova, ovf, vmdk
#!/bin/bash
# Export EC2 to OVA and save OVA in S3 bucket s3://export-vms/ubuntus/18-04/*.ova
aws ec2 create-instance-export-task \
--instance-id i-0c006d5b801050318 \
--target-environment vmware \
--export-to-s3-task DiskImageFormat=VMDK,ContainerFormat=ova,S3Bucket=export-vms,S3Prefix=ubuntus/18-04/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment