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 a disk
  3. Recovering a disk from an image

Recovering a disk from an image

Note

You cannot recover a boot disk of an existing VM from a snapshot or image. However, you can create a new VM to recover a boot disk from a snapshot.

To create a disk from an image:

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

  2. Select Compute Cloud.

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

  4. Click Create disk.

  5. Enter the disk 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 an arbitrary description for the disk.

  7. Select the availability zone to place the disk in.

  8. Set the disk parameters: disk type, block size, and disk size.

  9. In the Contents field, select Image and select the image you need in the list below. Use the filter to find the image.

  10. If required, select a schedule for automatic snapshot creation, or set up a new schedule. For more information about setting up schedules, see the instructions.

    When creating a disk, you can select only one snapshot schedule. Once the disk is created, you can add a few more schedules by following the instructions.

  11. Click Create disk.

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 the description of the CLI commands for managing disks and images:

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

    yc compute image list
    

    Result:

    +----------------------+------------+--------+----------------------+--------+
    |          ID          |    NAME    | FAMILY |     PRODUCT IDS      | STATUS |
    +----------------------+------------+--------+----------------------+--------+
    | fd8ool134m70******** | test-image |        | f2e3eaei7io3******** | READY  |
    | fd8u2d7plgpu******** | image-2    |        |                      | READY  |
    +----------------------+------------+--------+----------------------+--------+
    
  3. Select the identifier (ID) or name (NAME) of the desired image.

  4. Create a disk from the selected image.

    yc compute disk create <disk_name> \
      --source-image-name <image_name> \
      --description <text_description_of_disk>
    

    You can use the --source-image-name or --source-image-id parameter to specify the image.

    For more information about the yc compute disk create command, see the CLI reference.

  5. 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 |   il1-a   | READY  | a7lcvu28njbh******** |                 |             |
    | a7lv5j5hm1p1******** | second-disk  | 21474836480 |   il1-a   | READY  |                      |                 |             |
    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    

    Get the same list with more details in YAML format:

    yc compute disk list --format yaml
    

    Result:

    - id: fhm4aq4hvq5g********
        folder_id: b1gm3og7ei7a********
        created_at: "2018-10-29T07:43:06Z"
        name: first-disk
        description: my first disk via yc
        type_id: network-hdd
        zone_id: il1-a
        size: "10737418240"
        status: READY
    - id: fhmo6rdqg5fo********
        folder_id: b1gm3og7ei7a********
        created_at: "2018-10-29T07:33:04Z"
        name: second-disk
        description: my second disk via yc
        type_id: network-hdd
        zone_id: il1-a
        size: "8589934592"
        product_ids:
        - f2en2dtd08b5********
        status: READY
        source_image_id: fdvk34al8k5n********
        instance_ids:
        - fhm5b617fjnj********
    
  1. Retrieve a list of images using the ImageService/List grPC API method or the list method of the REST API Image resource.
  2. Create a disk using the DiskService/Create gRPC API method or the create method of the REST API Disk resource. Specify the image ID in your request.

After creation, the disk will have the Creating status. Wait until the disk status changes to Ready before using it.

See alsoSee also

  • Creating a VM from a custom image
  • Attaching a disk to a VM and mounting partitions
© 2023 Nebius Israel Ltd