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 criteria:

  • K2 Cloud images — images that K2 Cloud offers;

  • partner images — images that K2 Cloud partners offer;

  • own images – images created by a user in the Images subsection;

  • shared images – images accessible to a user.

Own and shared images can also include images created during the backup process. To display them in the resource table, enable Show recovery points.

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.

Volume

Device name

Boot device

disk1

Additional volume

disk[2-9]

Billing#

K2 Cloud and partner images are free of charge. In case of available or own images, the image owner is charged hourly for the total size of all snapshots comprising the image.

Available quotas#

The following default quotas are allocated to images:

  • 170 images in a project;

  • 42 simultaneously creating images in a project.

If necessary, you can increase quotas. To do this, contact the support service via the support portal or by email support@k2.cloud.

Managing images#

Creating an image#

You can create a new image in several ways:

Creating your image#

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.

  1. Go to Virtual machines Storage Images.

  2. Click Create.

  3. In the window that opens, set the required parameters on the Parameters step:

    • image name;

    • description;

    • legacy OS support option (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.

  4. Click Select snapshot to proceed to the next step.

  5. In the window that opens, select the snapshot and set the volume configuration.

    Parameter

    Description

    Snapshot

    The snapshot from which you plan to create an instance.

    Size

    Volume size in GiB (1 GiB = 1,024 MiB = 230 byte).

    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 volumes types gp2, st2 and st3 the number of IOPS is calculated automatically, for the volume type io2 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.

    Delete with the instance

    It specifies whether the volume must be automatically deleted after the instance is deleted.

    To select additional volumes, click Add volume.

    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.

  6. Once you have added all the required volume, click Create image.

Copy an image#

The image is available in the region where it was created. You can copy the image to another region or make a copy in the same region.

By copying a public image or image from another project into your own project, you will be able to continue using it if, for example, the image owner decides to delete it or restrict access.

  1. Go to Virtual machines Storage Images and select the desired image in the table.

  2. Click Copy.

  3. In the window that opens, specify:

    • the name to be assigned to the image copy;

    • the description, for example, what software is installed;

    • the region to which the image should be copied.

  4. To set tags, click Add tags. If no tags are required, skip the next step.

  5. To add a tag, click Add tag and enter tag key and value.

    Note

    If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value.

  6. After setting all the required parameters, click Copy.

You can also delete copy the image on its page in the Information tab.

Set access#

Image is private by default. You can launch instances from an image only within the project in which it was created. You can grant or revoke access to an image for projects of your choice. To that end:

  1. Go to Virtual machines Storage Images and select the desired image in the table.

  2. Click Set access.

  3. In the window that opens, add or remove projects.

  4. Click Apply.

You can also manage access settings on the image page. To do this:

  1. Go to Virtual machines Storage Images, select the desired image in the resource table and click on the image ID to go to its page.

  2. In the Information tab, click the editing icon for the Common access parameter.

  3. In the window that opens, add or remove projects.

  4. Click Apply.

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 K2 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.

Set tags#

Once the image is created, you can assign tags to it.

Note

Information about assigned tags is not passed to other projects that are granted access to the image.

To add, modify or delete image tags:

  1. Go to Virtual machines Storage Images.

  2. In the resource table, select the image for which tags should be modified and click on the image ID to go to its page.

  3. Open the Tags tab.

  4. To add a tag, click Add tag and specify the Key and Value fields.

    To modify a tag, edit the required fields (Value and/or Key) of the respective tag.

    To delete a tag, click the icon next to the tag you no longer need.

    Note

    If no tags have been set earlier, you can add the Name tag by clicking Add Name tag and specifying its value.

  5. Click Apply to save the changes.

Deleting an image#

  1. Go to Virtual machines Storage Images.

  2. Select the image in the resource table and click Delete. In the window that opens, you will be prompted to delete all volume snapshots associated with this image.

  3. Confirm deletion.

Create an instance from an image#

You can use created images to start instances. You can do it both using the instance wizard and from the image itself. To do this:

  1. Go to Virtual machines Storage Images.

  2. 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.

    Note

    If the image contains a backup copy of the instance, we recommend creating the instance directly from the backup. In this case, you will not need to redefine the instance parameters.

  3. Follow the steps from 2 to 7 as described in instance wizard.

Information about an image#

General information about existing images can be viewed in the resource table in Virtual machines Storage Images.

To open the page of a particular image, click its ID in the resource table in the Images subsection.

The Information tab displays the main image characteristics and parameters:

  • image name;

  • description;

  • state;

  • project in which the image was created;

  • legacy OS support;

  • project(s), which can access the image;

  • boot menu state (on/off);

  • boot device;

  • number of volumes, included in the image.

Here you can modify the image description, modify access settings, create an instance and delete the image.

The Volumes tab displays a table with details of volumes included in the image:

  • volume name;

  • volume snapshot;

  • snapshot size;

  • volume type;

  • device type: boot or additional volume.

The Tags tab displays all tags assigned to the image. You can add new, modify existing, and delete no-longer-needed tags.