---
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 the OpenStack CLI](#configure-openstack-cli).

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

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

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

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

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

Use the [Configure OpenStack CLI using OS tools](/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) subsection of the OpenStack CLI instructions.

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

1. [Open the 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 [default image](/cloud-servers/images/about-images.mdx#default-images) that will be used as a source to create the volume. You can view the list of images using the command `openstack image list`;
   * `<size>` — volume size in GB. The minimum volume size must be equal to the size of the source it was created from. Keep in mind the [network volume limits](/cloud-servers/volumes/about-network-volumes.mdx#network-volume-limits) on 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` is the name for creating a network volume of the Universal SSD v2 type in the [pool segment](/infrastructure/locations.mdx#pool) ru-9a. You can view the list of volume types using the `openstack volume type list` command or in the [List of network volume types across 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 uploaded, for example, `ru-9a`. You can view the list of available pool segments in the [Selectel infrastructure](/infrastructure/locations.mdx#selectel-infrastructure);
   * `<volume_name>` — volume name.

3. Optional: verify 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 command `openstack volume list`.

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

1. [Open the 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 command `openstack volume list`;
   * `<disk_size>` — disk size in GB. The minimum disk size must be equal to the disk size of the [default image](/cloud-servers/images/about-images.mdx#default-images) from which you [created the volume](#create-volume-from-default-image). Keep in mind the [network volume limits](/cloud-servers/volumes/about-network-volumes.mdx#network-volume-limits) on maximum size;
   * `<ram_size>` — RAM size in GB. The minimum RAM size must be equal to the RAM size of the [default 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 the 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>` — virtual network interface card driver type:

     * `e1000` — with a data transfer rate of up to 1 Gbps;
     * `e1000e` — with a data transfer rate of up to 2.5 Gbps;
     * `virtio` — the driver has no data transfer rate limits, but the default Cloud Platform limit is 3 Gbps;

   * `hw_vif_multiqueue_enabled=true` — the property enables the `virtio` network driver to use multiple vCPUs. This is required to increase the data transfer rate from 3 Gbps to 5 Gbps;

   * `<image>` — ID or name of the image. You can view the list of images using the command `openstack image list`.

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

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

2. Delete the network volume that you [created from the default 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 command `openstack volume list`.

<Formbricks />
