Fortinet black logo

Importing the disk file as a snapshot

Copy Link
Copy Doc ID 503ec629-6737-11e9-81a4-00505692583a:622178
Download PDF

Importing the disk file as a snapshot

Follow the steps below to convert the disk file to snapshot, so that you can create an image based on the snapshot. To run the AWS commands in this topic, you must have:

To import the disk file as a snapshot:

  1. Create a .json file in your local directory containing the following information. The "Format" should be "raw". The "Url" is the Object URL of the disk file.

    {

    "Description": "the-description-of-the-snapshot",

    "Format": "raw",

    "Url": "https://s3.ap-northeast-2.amazonaws.com/fwm/boot.disk"

    }

  2. Run command to import the disk file as a snapshot.
    aws ec2 import-snapshot --description "the-description-of-the-snapshot" --disk-container file://cm.json

    The following printout will display:

    {

    "ImportTaskId": "import-snap-abcd1234",

    "SnapshotTaskDetail":[

    {

    "DiskImageSize": "0.0",

    "Progress": "3",

    "Status": "active",

    "Description": "FWM-disk",

    "url": "https://s3.ap-northeast-2.amazonaws.com/fwm/boot.disk"

    "StatusMessage": "pending"

    }

    ],

    "Description": "FWM-import-task"

    }

  3. Use the describe-import-snapshot-tasks command to confirm that your snapshot is imported successfully. The following is an example.
    $ aws ec2 describe-import-snapshot-tasks --import-task-ids import-snap-abcd1234
    Wait until the status in the printout shows completed, which means the import task is completed and the snapshot is ready to use.

Importing the disk file as a snapshot

Follow the steps below to convert the disk file to snapshot, so that you can create an image based on the snapshot. To run the AWS commands in this topic, you must have:

To import the disk file as a snapshot:

  1. Create a .json file in your local directory containing the following information. The "Format" should be "raw". The "Url" is the Object URL of the disk file.

    {

    "Description": "the-description-of-the-snapshot",

    "Format": "raw",

    "Url": "https://s3.ap-northeast-2.amazonaws.com/fwm/boot.disk"

    }

  2. Run command to import the disk file as a snapshot.
    aws ec2 import-snapshot --description "the-description-of-the-snapshot" --disk-container file://cm.json

    The following printout will display:

    {

    "ImportTaskId": "import-snap-abcd1234",

    "SnapshotTaskDetail":[

    {

    "DiskImageSize": "0.0",

    "Progress": "3",

    "Status": "active",

    "Description": "FWM-disk",

    "url": "https://s3.ap-northeast-2.amazonaws.com/fwm/boot.disk"

    "StatusMessage": "pending"

    }

    ],

    "Description": "FWM-import-task"

    }

  3. Use the describe-import-snapshot-tasks command to confirm that your snapshot is imported successfully. The following is an example.
    $ aws ec2 describe-import-snapshot-tasks --import-task-ids import-snap-abcd1234
    Wait until the status in the printout shows completed, which means the import task is completed and the snapshot is ready to use.