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:
|
-
Click Compute > Outscale Machine Images.
You can also select an instance in the Instances page and click Create OMI .
-
Click Create .
The CREATE OMI dialog box appears. -
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.
-
-
Check the From instance box, and select an instance from the list.
You cannot create an OMI from a terminated instance.
-
(optional) To stop the instance before the creation of the OMI and then reboot it, leave the Reboot the instance box checked.
-
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:
|
To create an OMI, use the create-image command following this syntax:
$ 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 toreboot
, the instance is stopped before the creation of the OMI, and then is restarted. If set tono-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.
{
"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.