Today we see as use our instance to import a virtual image in AWS by VM Import
Upload our virtual image in a bucket S3.
Create a role in our account and edit the trust relationships with this code:
Create a policy in this role:
Do attention to this part of the code:
Insert our s3 arn of the virtual machine.
Go to our instance, select the instance ->INSTANCE SETTINGS -> ATTACH IAM ROLE and select our role.
We enter in the machine e create a file with this name: containers.json and paste this code:
Do attention to insert our data. So install the aws cli if it isn’t installed and check if the instance have the role :
Now we can import the virtual image with this code:
We replace the description, licenze value and region with our data. After this command, in the output we can read the ami id and, for check the progress we can use:
This is the possible status:
active — The import task is in progress.
deleting — The import task is being canceled.
deleted — The import task is canceled.
updating — Import status is updating.
validating — The imported image is being validated.
validated — The imported image was validated.
converting — The imported image is being converted into an AMI.
completed — The import task is completed and the AMI is ready to use
When the process if finished, we can see our vm as AMI.
Let us know if you have solved the problem!
AWS Certified Solutions Architect Official Study Guide: https://amzn.to/2HQ0UM4
AWS Certified Solutions Architect Associate Practice Tests: https://amzn.to/2T9APwz