2
Is there anyway I can launch an instance in amazon using my laptop's image?
2
Is there anyway I can launch an instance in amazon using my laptop's image?
4
Did you check AWS documentation ? Here is what it says:
Import Your VM as an Image:
a- VM Import Service Role
VM Import requires a role to perform certain operations, such as downloading disk images from an Amazon S3 bucket. You must create a role with the name vmimport with the following policy and trusted entities.
To create the service role:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "vmie.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals":{ "sts:ExternalId": "vmimport" } } } ] }
create-role
command to create a role named vmimport
and give VM Import/Export access to it.aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json
role-policy.json
with the following policy, where disk-image-file-bucket
is the bucket where the disk images are stored:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": [ "arn:aws:s3:::disk-image-file-bucket" ] }, { "Effect": "Allow", "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::disk-image-file-bucket/*" ] }, { "Effect": "Allow", "Action":[ "ec2:ModifySnapshotAttribute", "ec2:CopySnapshot", "ec2:RegisterImage", "ec2:Describe*" ], "Resource": "*" } ] }
put-role-policy
command to attach the policy to the role created above:aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.json
Import your VM to EC as an image:
aws ec2 import-image --description "Windows 2008 OVA" --disk-containers file://containers.json
Where containers.json file is:
[ { "Description": "Windows 2008 OVA", "Format": "ova", "UserBucket": { "S3Bucket": "my-import-bucket", "S3Key": "vms/my-windows-2008-vm.ova" } }]
Now you have finished all these steps, you have an AMI ready to be used to launch your instance.
Please check this
External links can break or be unavailable, in which case your answer would not be useful. Please include the essential information within your answer and use the link for attribution and further reading. Alternatively, you have enough rep to post just a link as a helpful comment. Thanks. – fixer1234 – 2016-08-03T19:31:15.347
Hello, can you show me how to create a .img files from the Windows system? – The One – 2017-08-07T06:07:49.073