Creating an OMI from an Instance

You can create an OUTSCALE Machine Image (OMI) from an instance. The OMI is created with all data contained in the instance.

This action also creates a snapshot of the root volume of the instance, as well as a snapshot of each BSU volume attached to the instance. For more information, see About OMIs.

Creating an OMI From an Instance Using Cockpit

Before you begin:

  1. If you intend to share the OMI with other users, clean critical information of the instance that you do not want to share:

  2. (Windows instances only) To reinitialize your Windows instance system, execute the OMI Creation Launcher script in the C:\Windows\Outscale\scripts directory of the instance.

    • This script is only available on instances launched using an official OMI. If the instance has been launched using a non-official OMI, you can perform a sysprep. For more information, see the official sysprep documentation by Windows.

    • This script enables instances launched using the future OMI to be reinitialized (ID, keypair, administrator password, and so on).

    The instance automatically stops when the script is done.

  1. Click Compute > Outscale Machine Images.

    You can also select an instance in the Instances page and click Create OMI .

  2. Click Create .
    The CREATE OMI dialog box appears.

  3. In the General section, type:

    • A name for the OMI in the Name field.

      This name must be unique and must contain between 3 and 128 characters. Allowed characters are a-z, A-Z, 0-9, spaces, and [_()/.-].

    • (optional) A description of the OMI in the Description field.

      This description can contain up to 255 Unicode characters.

  4. Check the From instance box, and select an instance from the list.

    You cannot create an OMI from a terminated instance.

  5. (optional) To stop the instance before the creation of the OMI and then reboot it, leave the Reboot the instance box checked.

  6. Click Create.
    The OMI is created and appears on the Outscale Machine Images page. The snapshots created for the OMI appear on the Snapshots page.

Creating an OMI Using AWS CLI

Before you begin:

  1. If you intend to share the OMI with other users, clean critical information of the instance that you do not want to share:

  2. (Windows instances only) To reinitialize your Windows instance system, execute the OMI Creation Launcher script in the C:\Windows\Outscale\scripts directory of the instance.

    • This script is only available on instances launched using an official OMI. If the instance has been launched using a non-official OMI, you can perform a sysprep. For more information, see the official sysprep documentation by Windows.

    • This script enables instances launched using the future OMI to be reinitialized (ID, keypair, administrator password, and so on).

    The instance automatically stops when the script is done.

To create an OMI, use the create-image command following this syntax:

Request sample
$ aws ec2 create-image \
    --profile YOUR_PROFILE \
    --instance-id i-12345678 \
    --name OMI_NAME \
    --description OMI_DESCRIPTION \
    --no-reboot \
    --block-device-mappings 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.

  • instance-id: The ID of the instance from which you want to create the OMI.

  • name: The name of the OMI.

    This name must be unique and must contain between 3 and 128 characters. Allowed characters are a-z, A-Z, 0-9, spaces, and [_()/.-].

  • (optional) description: A description for the OMI.

    This description can contain any Unicode character, with no length limit.

  • (optional) reboot | no-reboot: By default or if set to reboot, the instance is stopped before the creation of the OMI, and then is restarted. If set to no-reboot, the instance is not stopped before the creation of the OMI.

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

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

The create-image command returns the following element:

  • ImageId: The ID of the newly created OMI.

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

The new OMI is created from the specified instance.

Related Pages

Corresponding API Method

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