Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
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 service resource operations
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Creating an image
  3. Creating an image from another custom image

Creating an image from another custom image

Written by
Yandex Cloud
Improved by
Danila N.
Updated at August 6, 2025

To create an image from another custom image:

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

  2. In the list of services, select Compute Cloud.

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

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

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

    • It must be from 2 to 63 characters long.
    • It can only 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. Expand the Additional section:

  8. Optionally, in the Hardware generation field, select the virtualized hardware generation you want to assign to the new image:

    • Gen 1.2 (MBR, BIOS): Gen 1.2.
    • Gen 1.1 (MBR, BIOS): Gen 1.1.

    If you make no assignment, by default the new image will get the same generation assigned as the source image.

  9. Optionally, to create an optimized image, enable Optimization.

  10. Click Create.

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command 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 images in the default folder:

    yc compute image list
    

    Result:

    +----------------------+-------------+--------+-------------+--------+
    |          ID          |    NAME     | FAMILY | PRODUCT IDS | STATUS |
    +----------------------+-------------+--------+-------------+--------+
    | fd8n3spmksqm******** | first-image |        |             | READY  |
    +----------------------+-------------+--------+-------------+--------+
    
  3. Select ID or NAME of the image in question.

  4. Create an image in the default folder:

    yc compute image create \
      --name <name_of_new_image> \
      --source-image-name <source_image_name> \
      --pooled \
      --hardware-generation-id <hardware_generation> \
      --hardware-features pci_topology=<PCI_topology>
    

    Where:

    • --name: Image name. The naming requirements are as follows:

      • It must be from 2 to 63 characters long.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • --source-image-name: Source image name. Instead of a name, you can provide the source image ID in the --source-image-id parameter.

    • --pooled: Parameter you can use to create an optimized image. This is an optional setting.

    • --hardware-generation-id: Virtualized hardware generation assigned to the image. This is an optional setting. The possible values are:

      • legacy: Gen 1. If you select this generation, you can also specify the PCI topology in the --hardware-features parameter.

      If not specified, the new image will get the same hardware generation assigned as the source image.

    • --hardware-features: Additional settings for Gen 1. This is an optional setting. The possible values are:

      • pci_topology=v1: PCI_TOPOLOGY_V1 topology.
      • pci_topology=v2: PCI_TOPOLOGY_V2 topology.

      If the source image has Gen 1 assigned, by default the new image will get the same --hardware-features value as the source image.

    Result:

    done (11s)
    id: fd8ggkhegumb********
    folder_id: b1gt6g8ht345********
    created_at: "2025-06-23T07:13:41Z"
    name: new-image
    storage_size: "9877585920"
    min_disk_size: "21474836480"
    product_ids:
      - f2ercusam4no********
    status: READY
    os:
      type: LINUX
    hardware_generation:
      legacy_features:
        pci_topology: PCI_TOPOLOGY_V2
    

If you do not have Terraform yet, install it and configure the 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_image = "<source_image_ID>"
      hardware_generation {
        legacy_features {
          pci_topology = "<PCI_topology>"
        }
      }
    }
    

    Where:

    • name: Image name. The naming requirements are as follows:

      • It must be from 2 to 63 characters long.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • source_image: Source image ID.

    • hardware_generation: Block of settings describing the virtualized hardware generation assigned to the image. This is an optional setting. It includes the following blocks of settings:

      • legacy_features: Settings with the description of parameters for Gen 1:

        • pci_topology: Selecting the PCI topology. The possible values are:

          • PCI_TOPOLOGY_V1
          • PCI_TOPOLOGY_V2

        The legacy_features and generation2_features sections are mutually exclusive.

      Note

      If the hardware_generation settings are not specified, the new image will get the same hardware generation assigned as the source image.

    For more information about the yandex_compute_image resource, see the relevant provider documentation.

  2. Make sure the configuration files are correct.

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

    2. Run a check using this command:

      terraform plan
      

    If the configuration description is correct, the terminal will display a list of the resources being created and their settings. 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.

    This will create all the resources you need in the specified folder. You can check the new resources and their settings using the management console.

  1. Get a list of images using the list REST API method for the Image resource or the ImageService/List gRPC API call.
  2. Create a new image using the create REST API method for the Image resource or the ImageService/Create gRPC API call. In your request, specify the source image ID, and optionally the desired virtualized hardware generation in the hardwareGeneration object (hardware_generation if using the gRPC API).

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

Was the article helpful?

Previous
Creating an image from a disk snapshot
Next
Getting a list of images
© 2025 Direct Cursus Technology L.L.C.