Nebius Israel
Contact usConsole
  • GPU
  • Docs
© 2023 Nebius Israel Ltd
Compute Cloud
  • Container Solution
  • Access management
  • Pricing policy
  1. Step-by-step guides
  2. Creating an image
  3. Creating an image from another custom image

Creating an image from another custom image

To create an image from another user image:

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

  2. Select Compute Cloud.

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

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

  5. Enter the image name.

    • The length can be from 3 to 63 characters.
    • It may contain lowercase Latin letters, numbers, and hyphens.
    • The first character must be a letter. The last character can't be a hyphen.
  6. If required, provide a text description for the image.

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

  8. Click Create.

If you don't have the Nebius Israel command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View a description of the CLI command to create an image:

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

    yc compute image list
    +----------------------+-------------+--------+-------------+--------+
    |          ID          |    NAME     | FAMILY | PRODUCT IDS | STATUS |
    +----------------------+-------------+--------+-------------+--------+
    | fd8n3spmksqmuraspf4h | first-image |        |             | READY  |
    +----------------------+-------------+--------+-------------+--------+
    
  3. Select the ID (ID) or the name (NAME) of the desired snapshot.

  4. Create an image in the default folder:

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

    This command will create an image named new-image and the description new image via yc from the first-image image.

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

    yc compute image create \
      --name new-image \
      --source-image-name first-image \
      --description "new image via yc" \
      --pooled
    
  1. Get the 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.

If you do not have Terraform yet, install it and configure the provider Nebius Israel.

  1. Describe the resource parameters in the yandex_compute_image configuration file.

    Example of the configuration file structure:

    resource "yandex_compute_image" "image-1" {
      name         = "<image name>"
      source_image = "<source image ID>"
    }
    

    For more information on resources that you can create with Terraform, see the provider documentation.

  2. Make sure the configuration files are valid.

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

    2. Run the check using this command:

      terraform plan
      

    If the configuration is described correctly, the terminal will display a list of created resources and their parameters. If the configuration contains any errors, Terraform will point them out.

  3. Deploy cloud resources.

    1. Run this command:

      terraform apply
      
    2. Confirm that you want to create the resources.

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

After creation, the image will have the CREATING status. Wait until the image status changes to READY before using it.

© 2023 Nebius Israel Ltd