Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Compute Cloud
    • All guides
      • Preparing a disk image
      • Uploading a custom image
      • Creating an image from a disk
      • Creating an image from a disk snapshot
      • Creating an image from another custom image
    • Viewing operations with resources
  • Yandex Container Solution
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Creating an image
  3. Creating an image from a disk

Creating an image from a disk

Written by
Yandex Cloud
Improved by
Danila N.
Updated at May 5, 2025

To create an image from a disk:

Management console
CLI
Terraform
API

Note

You can use the management console to create images of network SSDs and HDDs. To create an image of a non-replicated SSD or an ultra high-speed network storage with three replicas (SSD), use the CLI, Terraform, or API.

  1. In the management console, select the folder where you want to create an image.

  2. Select Compute Cloud.

  3. In the left-hand panel, select Disks.

  4. In the line with the disk, click and select Create image.

  5. Enter a name for the image. The naming requirements are as follows:

    • It must be from 2 to 63 characters long.
    • It may contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.
  6. Provide a text description for the image, if required.

  7. To create an optimized image, enable Optimize for deployment.

  8. Click Create.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for creating an image:

    yc compute image create --help
    
  2. Get a list of disks in the default folder:

    yc compute disk list
    

    Result:

    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    |          ID          |     NAME     |    SIZE     |       ZONE        | STATUS |     INSTANCE IDS     | PLACEMENT GROUP | DESCRIPTION |
    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    | a7lqgbt0bb9s******** | first-disk   | 20401094656 |   ru-central1-a   | READY  | a7lcvu28njbh******** |                 |             |
    | a7lv5j5hm1p1******** | second-disk  | 21474836480 |   ru-central1-a   | READY  |                      |                 |             |
    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    
  3. Select ID or NAME of the disk you need.

  4. Create an image in the default folder:

    yc compute image create \
      --name first-image \
      --source-disk-name first-disk \
      --description "my first image via yc"
    

    This command will create an image named first-image described as my first image via yc from first-disk.

    To create an optimized image, use the --pooled flag:

    yc compute image create \
      --name first-image \
      --source-disk-name first-disk \
      --description "my first image via yc" \
      --pooled
    

If you do not have Terraform yet, install it and configure its Yandex Cloud provider.

  1. Define the parameters of the yandex_compute_image resource in the configuration file.

    Here is an example of the configuration file structure:

    resource "yandex_compute_image" "image-1" {
      name        = "<image_name>"
      source_disk = "<disk_ID>"
    }
    

    For more information about the resources you can create with Terraform, see the relevant provider documentation.

  2. Make sure the configuration files are correct.

    1. In the command line, go to the directory where you created the configuration file.

    2. Run a check using this command:

      terraform plan
      

    If the configuration is correct, the terminal will display a list of resources to create and their parameters. If the configuration contains any errors, Terraform will point them out.

  3. Deploy the cloud resources.

    1. Run this command:

      terraform apply
      
    2. Confirm creating the resources.

    All the resources you need will then be created in the specified folder. You can check the new resources and their settings using the management console.

  1. Get a list of disks using the list REST API method for the Disk resource or the DiskService/List gRPC API call.
  2. Create an image using the create REST API method for the Image resource or the ImageService/Create gRPC API call. Specify the disk ID in your request.

Once created, the image will get the CREATING status. Wait until its status changes to READY before using it.

Was the article helpful?

Previous
Uploading a custom image
Next
Creating an image from a disk snapshot
Yandex project
© 2025 Yandex.Cloud LLC