Creating an OMI from a Snapshot
You can create OUTSCALE machine images (OMIs) from snapshots. With AWS CLI, this action corresponds to registering an OMI and specifying a snapshot ID in its block device mapping.
Creating an OMI from a Snapshot Using Cockpit v1
Before you begin:
|
-
Click Compute > Outscale Machine Images.
You can also select a snapshot in the Snapshots page and click Create OMI .
-
Click Create .
The CREATE OMI dialog box appears. -
In the General section, type:
-
In the Name field, a name for 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) In the Description field, a description for the OMI.
This description can contain up to 255 Unicode characters.
-
-
Check the From snapshot box.
-
From the top list, select the snapshot you want to create the OMI from.
-
From the bottom list, select the architecture for the OMI (
i386
orx86_64
). -
Set the Delete on termination option for volumes of instances launched from the OMI:
-
To automatically delete the volumes of an instance you terminate, switch the button to
True
.Data stored on the deleted volumes is lost and cannot be retrieved.
Before you delete it, ensure you have a backup or snapshot of it. For more information, see Creating a Snapshot of a Volume.
-
To keep the volumes of an instance you terminate, switch the button to
False
.
-
-
Click Create to validate.
The OMI is created and appears on the Outscale Machine Images page.
Creating an Image from a Snapshot Using Cockpit v2-beta
Before you begin:
|
-
In the Images dashboard, click
Create Image.
The CREATE IMAGE dialog box appears. -
In the Name field, type a name for the image.
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) In the Description field, type a description for the image.
-
Select From snapshot and select a snapshot from the Snapshot selection list.
-
In the Architecture selection list, select an architecture for the image (
i386
orx86_64
). -
Set the Delete on termination option for volumes of VMs launched from the image:
-
To automatically delete the volumes of a VM you delete, switch the button to
True
.Data stored on the deleted volumes is lost and cannot be retrieved.
Before you delete it, ensure you have a backup or snapshot of it. For more information, see Creating a Snapshot of a Volume.
-
To keep the volumes of a VM you delete, switch the button to
False
.
-
-
Click Create Image.
The image is created.
Creating an OMI from a Snapshot Using OSC CLI
Before you begin:
|
See the CreateImage command sample in the documentation of the OUTSCALE API. |
Creating an OMI from a Snapshot Using AWS CLI
Before you begin:
|
To create an OMI, use the register-image command following this syntax:
$ aws ec2 register-image \
--profile YOUR_PROFILE \
--name "Test Image" \
--description "My test image" \
--architecture x86_64 \
--root-device-name /dev/sda1 \
--block-device-mappings "[{\"DeviceName\": \"/dev/sda1\", \
\"Ebs\": \
{\"SnapshotId\": \"snap-12345678\"} \
}]" \
--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 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)
architecture
: The architecture of the OMI. By default, set toi386
(32-bit architecture). -
root-device-name
: The device name assigned to the root volume. -
block-device-mappings
: The block device mapping indicating the snapshot to use for the root volume. This attribute requires the following elements:-
DeviceName
: The device name assigned to the root volume.You must specify the same device name as in the
root-device-name
attribute. -
Ebs
: Information about the root volume to create. This element requires the following information:-
SnapshotId
: The ID of the snapshot from which you want to create the OMI.
-
-
-
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 newly created OMI.
{
"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.