Importing an OMI from a Bucket

You can import an OUTSCALE Machine Image (OMI) that has been previously exported to an S3-compatible bucket to create a copy of it in your account.

This enables you to copy an OMI between accounts that are in different Regions or in the same one. The copy of the OMI belongs to your account, is independent from the source OMI, and gets its own ID. Any snapshot used by the source OMI is also copied to your account.

When importing the OMI, you need to specify one of the following elements for the image location:

The manifest file is obsolete seven days after a completed export as it contains pre-signed URLs to the appropriate snapshots (pre-signed URL are valid for only seven days).

Importing an OMI Using Cockpit v1

  1. Click Compute > Outscale Machine Images.

  2. Click Import .
    The IMPORT OMI dialog box appears.

  3. Specify the information for the import:

    1. In the Manifest URL field, type the pre-signed URL for the manifest file of the OMI.

    2. In the Name field, type the name for the copy of the OMI in your account.

    3. (optional) In the Description field, type a description for the copy of the OMI in your account.

  4. Click Import to validate.
    A copy of the OMI is imported to your account and appears on the Outscale Machine Images page.

Importing an OMI Using OSC CLI

See the CreateImage command sample in the documentation of the OUTSCALE API.

Importing an OMI Using AWS CLI

To import an OMI from a bucket, use the register-image command following this syntax:

Request sample
$ aws ec2 register-image \
    --profile YOUR_PROFILE \
    --name Test Image \
    --description Test \
    --architecture x86_64 \
    --image-location https://oos.eu-west-2.outscale.com/bucket/object?AWSAccessKeyId=A1BC2DE3FGHIJ4LMN567&Expires=1493971940&Signature=%2FR63JOJcFzNGubLEXckKGVIi8kk%3D \
    --root-device-name /dev/sda1 \
    --block-device-mapping YOUR_BLOCK_DEVICE_MAPPING \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • name: The name for the copy of the OMI in your account.

  • (optional) description: A description for the copy of the OMI in your account (if different from the source’s one)

  • (optional) architecture: The architecture for the copy of the OMI in your account (i386 | x86_64). If you do not specify any architecture, it is set to i386 by default.

  • (optional) image-location: The pre-signed URL of the OMI manifest file, or the full path to the OMI in the bucket.

    Note

    • If you specify a pre-signed URL in the image-location attribute, this is the only attribute you need to specify for the command as all the other information are contained in the manifest of the OMI.

    • If you specify a path to a bucket, you need to specify all the other attributes.

  • (optional) root-device-name: The device name for the root device (for example, /dev/sda1).

  • (optional) block-device-mapping: One or more block device mapping entries. For more information, see Defining Block Device Mappings.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The register-image command returns the following element:

  • ImageId: The ID of the copy of the OMI in your account.

Result sample
{
 "ImageId": "ami-12345678"
}

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.