Difference between revisions of "AWS vmexport using AWS cli"
From Notes_Wiki
(Created page with "<yambe:breadcrumb>Amazon web services|Amazon web services</yambe:breadcrumb> =AWS vmexport using AWS cli= '''The steps do not work''' # Create IAM user with requried role as...") |
m |
||
Line 1: | Line 1: | ||
[[Main_Page|Home]] > [[Amazon web services]] > [[AWS vmexport using AWS cli]] | |||
'''The steps do not work''' | '''The steps do not work''' | ||
Line 33: | Line 32: | ||
[[Main_Page|Home]] > [[Amazon web services]] > [[AWS vmexport using AWS cli]] |
Latest revision as of 05:19, 18 April 2022
Home > Amazon web services > AWS vmexport using AWS cli
The steps do not work
- Create IAM user with requried role as per https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role
- Since the JSON on the above link is malformed use AWS Management console GUI and go to
- Services
- IAM
- Roles
- Create role
- Use case
- EC2
- Polciy
- VMImportExportRoleForAWSConnector
- Role name
- vmimport #AS IT IS
- Since the JSON on the above link is malformed use AWS Management console GUI and go to
- Again go to roles vmimport and attach following additional policies
- Policy
- AmazonS3FullAccess
- Policy
- AmazonEC2FullAccess
- Install aws cli using Installing AWS command-line tools
- Create a S3 bucket for storing converted image eg saurabh-s3-vm-export
- Create an ami for testing export. The ami can be created from EC2 instance or lightsail instance snapshot exported to EC2.
- Start export using:
- aws ec2 export-image --image-id <ami-id> --disk-image-format <VMDK|RAW|VHD> --s3-export-location S3Bucket=<bucket-name>,S3Prefix=exports/
- The above keeps giving error:
- An error occurred (InvalidParameter) when calling the ExportImage operation: The service role vmimport provided does not exist or does not have sufficient permissions
- Remember to delete snapshot at lightsail and ec2. Deleting snapshot at EC2 requires de-registering the created AMI.
Refer: