Images
In this article:
Images#
General information#
If you often use a specific instance configuration, you can save it as an image. The image enables you to save launch parameters, so you don’t need to specify them every time you start an instance.
All images are grouped according to the following parameters:
NGN images – images that NGN Cloud offers;
own images – images created by a user in the Images section;
shared images – images accessible to a user.
An image is a list of volumes attached when an instance is created (Block Device Mapping). The list may contain both empty volumes and volumes created from a master snapshot. These volumes may exceed the source snapshot in size.
The table below lists all possible device options.
Device |
Device name |
---|---|
Root device |
disk1 |
Additional volume |
disk[2-9] |
Сreating/deleting an image#
You can create a new image in several ways:
Creating your image#
Note
When creating your image, pay attention to the following:
OS must support ACPI to ensure correct instance shutdown;
OS must be able to obtain IP address via DHCP, otherwise the system will be inaccessible from an external network (even if an external IP address is allocated explicitly);
OS must have VirtIO drivers installed; otherwise attachment/detachment of additional volumes will be impossible;
Make sure that all services required for remote access to the system are launched when OS starts.
Click Create in the Images section.
On the first step of creating a new cluster, set the required parameters:
Image name;
Description;
Enable support for legacy OS (if the instance does not have VirtIO drivers).
We recommend providing short descriptions for images for convenience, e.g., to indicate OS name and version.
At the second step, set the volume configuration and click Create image.
Parameter |
Description |
---|---|
Snapshot |
The snapshot from which you plan to create an instance. |
Size |
Volume size in gibibytes (1 gibibyte = 1,024 mebibytes). |
Volume type |
Sets the desired volume type. For more information on volume features and parameters see page Volumes. |
IOPS |
The maximum total number of I/O operations per second. For st2 and gp2 volumes the number of IOPS is calculated automatically, for io2 volumes you can specify the required number of IOPS. |
Throughput |
Maximum total speed, in MiB/s, at which data can be read from or written to a volume. It is calculated automatically for all existing volume types st2, gp2 and io2. |
Delete with the instance |
It specifies whether the volume must be automatically deleted after the instance is deleted. |
The volume marked with the icon will be bootable for the instance, while the rest volumes will be additional volumes. The bootable volume cannot be empty and, unlike additional volumes, cannot be detached from an instance.
Creating an image from an instance#
You can create an image both from a stopped or a running instance. Go to the Instances section, select an instance and create an image from it.
When an image is created from an instance, snapshots of all volumes attached to the instance will be created as well.
Important
Crash consistency across all volumes is ensured when creating an image from a running instance. It means that snapshots of all volumes are taken simultaneously, and all data written to the disk is saved (data from RAM is not included in the snapshot). To ensure that all data is included in the snapshot, we recommend you flush the cache and suspend writing to volumes before running the image create command.
Creating an image from an object in a bucket#
You can create an image from your volume snapshot stored in the bucket. To do this, download the snapshot into object storage and create an image from it.
Deleting an image#
Select the image you no longer need and click Delete. In the dialog window, you will be prompted to delete all volume snapshots associated with this image.
Create an instance from an image#
If necessary, you can start the instance from the created image straight away. You can do it both using instance wizard and directly from the image. Do the following:
Go to the Management console section Images.
Select an image in the resource table and click on Create instance. Alternatively you can right-click the line with the desired image and select Create instance.
Follow the steps from 2 to 7 as described in instance wizard.
Set access#
Image is prvate by default. You can launch instances from an image only within the project in which it was created. You can grant access to an image for projects of your choice. To that end:
Go to the Images section and select the desired image in the resource table.
Click Set access.
In the dialog window, add project(s) that are to be granted access.
Click Apply.
You can change access settings later, if necessary. To do this:
Go to the Image section, select the desired image in the resource table and click on the image ID to go to its page.
In the Information tab, click the editing icon for the Common access parameter.
In the dialog window, add or remove projects.
Click Apply.
Note
You can use both procedures for initial access setting, as well for access editing.
Attention
When granting access to other projects, pay special note to licensed software. License cloning is not allowed in some cases. Be careful and do not grant access to images containing sensitive data.
Note
Before 02.08.2022, public access to the image could be granted to all authorized NGN Cloud users. If you have public images, you can make them private by clearing the respective checkbox when setting the access to the image. This operation is irreversible: you cannot make the image public again.