AWS Classroom Series – 27/Jan/2020

Import the Image uploaded to S3 bucket

  • Refer Here for official docs
  • Create a json file called as contaienr.json with the following content
[
  {
    "Description": "Ubuntu 18 imported",
    "Format": "ova",
    "UserBucket": {
        "S3Bucket": "qtvmimportdemo",
        "S3Key": "bionic-server-cloudimg-amd64.ova"
    }
}]
  • Execute the following command to import the ova into ami
aws ec2 import-image --description "Ubuntu 18 imported" --disk-containers "file://C:\Users\QT\Downloads\containers.json"

#### output #########
{
    "Status": "active",
    "Description": "Ubuntu 18 imported",
    "SnapshotDetails": [
        {
            "UserBucket": {
                "S3Bucket": "qtvmimportdemo",
                "S3Key": "bionic-server-cloudimg-amd64.ova"
            },
            "DiskImageSize": 0.0,
            "Format": "OVA"
        }
    ],
    "Progress": "2",
    "StatusMessage": "pending",
    "ImportTaskId": "import-ami-09cef8ab9a75fa7fa"
}
  • Now monitor this import task by executing
aws ec2 describe-import-image-tasks --import-task-ids import-ami-09cef8ab9a75fa7fa

Other Import/Export Options

  • Importing an EC2 instance from VM
  • Exporting an EC2 instance to VM
  • Exporting an EC2 AMI to VM image.

Server Migration Service

Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Widget by Acurax Small Business Website Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube