---
title: "Modify a ready-made image"
sidebar_label: "Modify a ready-made image"
sidebar_position: 4
description: "How to modify Selectel ready-made images"
---

import Formbricks from '@theme/MDXComponents/Formbricks'

# Modify a ready-made image

You can modify ready-made images — for example, reformat an image to increase the data transfer speed to 5 Gbit/s or enable UEFI booting for the image.

1. [Configure OpenStack CLI](#configure-openstack-cli).

2. [Create a network volume from a ready-made image](#create-volume-from-default-image).

3. [Create a custom image from a volume](#create-custom-image-from-volume).

4. [Apply properties to a custom image](#apply-propetries-to-custom-image).

5. [Delete a network volume](#delete-volume).

## 1. Configure OpenStack CLI \{#configure-openstack-cli}

Use the [Configure OpenStack CLI in the OS](/cloud-servers/tools/openstack-cli/configure-openstack-cli.mdx#configure-openstack-in-os) or [Configure OpenStack CLI in a Docker container](/cloud-servers/tools/openstack-cli/configure-openstack-cli.mdx#configure-openstack-in-docker-container) section of the OpenStack CLI instructions.

## 2. Create a network volume from a ready-made image \{#create-volume-from-default-image}

1. [Open OpenStack CLI](/cloud-servers/tools/openstack-cli/).

2. Create a volume:

   ```bash
   openstack volume create \
       --image <image> \
       --size <size> \
       --type <volume_type> \
       --availability-zone <pool_segment> \
       <volume_name>
   ```

   Specify:

   * `<image>` — ID or name of the [ready-made image](/cloud-servers/images/about-images.mdx#default-images) that will be the source for creating the volume. You can view the list of images using the `openstack image list`;
   * `<size>` — disk size in GB. The minimum disk size must be equal to the source size from which it was created. Take into account [network volume limits](/cloud-servers/volumes/about-network-volumes.mdx#network-volume-limits) on the maximum size;
   * `<volume_type>` — ID or name of the [network volume type](/cloud-servers/volumes/about-network-volumes.mdx#network-volume-types). For example, `universal2.ru-9a` — name for creating a network volume of type SSD Universal v2 in the [pool segment](/infrastructure/availability-matrix.mdx#network-volumes) ru-9a. The list of disk types can be viewed using the `openstack volume type list` command or in the [List of network volume types in all pool segments](/cloud-servers/volumes/about-network-volumes.mdx#network-volume-types-full-list);
   * `<pool_segment>` — [pool segment](/infrastructure/locations.mdx#pool) where the image will be loaded, for example, `ru-9a`. A list of available pool segments can be viewed in the [Selectel Infrastructure](/infrastructure/locations.mdx#selectel-infrastructure);
   * `<volume_name>` — volume name.

3. Optionally, check that the created volume is in the `AVAILABLE` status:

   ```bash
   openstack volume show <volume> -c status
   ```

   Specify `<volume>` — ID or name of the network volume. You can view the list of volumes using the `openstack volume list`.

## 3. Create a custom image from a volume \{#create-custom-image-from-volume}

1. [Open OpenStack CLI](/cloud-servers/tools/openstack-cli/).

2. Create an image:

   ```bash
   openstack image create \
       --volume <volume> \
       --min-disk <disk_size> \
       --min-ram <ram_size> \
       <image_name>
   ```

   Specify:

   * `<volume>` — ID or name of the network volume. You can view the list of volumes using the `openstack volume list`;
   * `<disk_size>` — disk size in GB. The minimum disk size must be equal to the disk size of the [ready-made image](/cloud-servers/images/about-images.mdx#default-images) from which you [created the volume](#create-volume-from-default-image). Take into account [network volume limits](/cloud-servers/volumes/about-network-volumes.mdx#network-volume-limits) on the maximum size;
   * `<ram_size>` — memory size in GB. The minimum memory size must be equal to the memory size of the [ready-made image](/cloud-servers/images/about-images.mdx#default-images) from which you [created the volume](#create-volume-from-default-image);
   * `<image_name>` — image name.

## 4. Apply properties to a custom image \{#apply-propetries-to-custom-image}

1. [Open OpenStack CLI](/cloud-servers/tools/openstack-cli/).

2. Optionally, add one or more required properties:

   ```bash
   openstack image set \
       --property hw_cpu_sockets=<sockets>\
       --property hw_cpu_cores=<cores>\
       --property hw_cpu_threads=<threads> \
       --property hw_firmware_type=<firmware_type> \
       --property hw_video_model=<video_model> \
       --property hw_vif_model=<vif_model> \
       --property hw_vif_multiqueue_enabled=true \
       <image>
   ```

   Specify:

   * `<sockets>` — number of CPU sockets;

   * `<cores>` — number of CPU cores;

   * `<threads>` — number of CPU threads;

   * `<firmware_type>` — firmware type: `bios` or `uefi`;

   * `<video_model>` — graphics device driver: `vga` or `qxl`;

   * `<vif_model>` — type of virtual network card driver:

     * `e1000` — with a data transfer speed of up to 1 Gbit/s;
     * `e1000e` — with a data transfer speed of up to 2.5 Gbit/s;
     * `virtio` — the driver has no data transfer speed limit, but the cloud platform default limit is 3 Gbit/s;

   * `hw_vif_multiqueue_enabled=true` — this property enables the network driver `virtio` to use multiple vCPUs. This is required to increase the data transfer speed from 3 Gbit/s to 5 Gbit/s;

   * `<image>` — ID or name of the image. The list of images can be viewed using the `openstack image list`.

## 5. Delete a network volume \{#delete-volume}

1. [Open OpenStack CLI](/cloud-servers/tools/openstack-cli/).

2. Delete the network volume that you [created from a ready-made image](#create-volume-from-default-image):

   ```bash
   openstack volume delete <volume>
   ```

   Specify `<volume>` — ID or name of the network volume. You can view the list of volumes using the `openstack volume list`.

<Formbricks />
