![]() |
Create an access key. For more information, see "Creating an access key".
Obtain the user id. For more information, see "Obtaining the virtual server instance user id".
Converting the *.pem file to the *.ppk format and configure PuTTY for establishing an SSH connection. For more information, see "Configuring PuTTY".
For example: us-west-2.
The system displays the S3 bucket that you created.
![]() | Note |
|
If DNS resolution for the VPC is disabled, the execution of the aws s3 ls s3://<nameofbucket> command fails. |
{ "Version":"2012-10-17", "Statement":[ { "Sid":"", "Effect":"Allow",
"Principal":{ "Service":"vmie.amazonaws.com" }, "Action":"sts:AssumeRole",
"Condition":{ "StringEquals":{ "sts:ExternalId":"vmimport" } } } ] }
Ensure that you specify the full path to the location of the trust-policy.json file, and prefix file:// to it:
aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json
Where <your_bucket_name> is the bucket where the OVA is stored:
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource":[
"arn:aws:s3:::<your_bucket_name>"
]
},
{
"Effect":"Allow",
"Action":[
"s3:GetObject"
],
"Resource":[
"arn:aws:s3:::<your_bucket_name>/*"
]
},
{
"Effect":"Allow",
"Action":[
"ec2:ModifySnapshotAttribute",
"ec2:CopySnapshot",
"ec2:RegisterImage",
"ec2:Describe*"
],
"Resource":"*"
}
]
}
Ensure that you specify the full path to the location of the role-policy.json file.
aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.json
aws ec2 import-image --cli-input-json "{ \"Description\": \"<Server OVA>\", \"DiskContainers\": [ { \"Description\": \"<text description of task>\", \"UserBucket\": { \"S3Bucket\": \"<your_bucket_name>\", \"S3Key\" : \"<server.ova>\" } } ]}"
Ensure to replace appropriate values wherever brackets <> are present in above command.
The system displays the Status and the ImportTaskId parameters.
Where, ImportTaskId is the one from the output of the Step 8. For example: import-ami-ffmanv5x.
The conversion process takes up to 30 minutes. You can run the above command repeatedly. When the AMI conversion is successful, the system displays the Status as completed and also displays ImageId.
In the following example, the process is at the update stage and is 30% complete.
[ec2-user@ip-10-143-10-81 ~]$ aws ec2 describe-import-image-tasks --cli-input-json "{ \"ImportTaskIds\": [\"import-ami-ffgji45r\"], \"NextToken\": \"abc\", \"MaxResults\": 10 } " IMPORTIMAGETASKS CM-Simplex-07.1.0.0.xxx-aws-001.ova import-ami-ffgji45r 30 active updating
In the following example, the process is preparing the AMI and is 76% complete.
IMPORTIMAGETASKS x86_64 CM-Simplex-07.1.0.0.xxx-aws-001.ova import-ami-ffgji45r BYOL Linux 76 active preparing ami
The output format varies depending on the selection of the text or JSON format on the aws CLI configuration.
For more details, see "AWS Import your VM as an image" on the AWS website at http://docs.aws.amazon.com/vm-import/latest/userguide/import-vm-image.html.
The system displays the EC2 Management Console page.
You can search the converted AMI with ImageId. The system displays the newly converted AMI ImageId in the AMI ID column.
You can give an appropriate name for the AMI ImageId.
Comments on this document? | May 2018 | © 2016-2018, Avaya Inc. All Rights Reserved. |
