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 for business
    • 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
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
    • All guides
      • Creating an empty disk
      • Creating an empty disk with a large block
      • Creating a non-replicated disk
      • Creating a high-performance SSD
      • Recovering a disk from a snapshot
      • Recovering a disk from an image
    • Viewing service resource operations
    • Viewing metrics in Monitoring
    • NVIDIA driver update guide
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Creating a disk
  3. Recovering a disk from a snapshot

Recovering a disk from a snapshot

Written by
Yandex Cloud
Improved by
Danila N.
Updated at November 7, 2025

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 recover the boot disk of an existing VM, use Yandex Cloud Backup.

To create a disk from a snapshot:

Management console
CLI
Terraform
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 a name for the disk. 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 description for the disk, if required.

  7. Select the availability zone the disk will reside in.

  8. In the Contents field, select Snapshot and select your snapshot from the list that opens. Optionally, use the filter.

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

  10. Optionally, under Encryption:

    • Select Encrypted disk.
    • In the KMS key field, select the key you created earlier. To create a new key, click Create.

    To create an encrypted disk, you need the kms.keys.user role or higher.

    Warning

    You can specify encryption settings only when creating a disk. You cannot disable or change disk encryption. You also cannot enable encryption for an existing disk.

    If you deactivate the key used to encrypt a disk, image, or snapshot, access to the data will be suspended until you reactivate the key.

    Alert

    If you destroy the key or its version used to encrypt a disk, image, or snapshot, you will irrevocably lose access to the data. For details, see Destroying key versions.

  11. Optionally, select or create a schedule for automatic disk snapshots. For more information about setting up schedules, see this guide.

    You can create snapshots of network disks and drives, such as HDDs, SSDs, and non-replicated SSDs, as well as ultra high-speed network storages with three replicas (SSD).

    For non-replicated SSDs and ultra high-speed network storages with three replicas (SSD), the snapshot time is not determined.

    To create snapshots of local disks residing on dedicated hosts, use Yandex Cloud Backup. This service supports Ubuntu, CentOS, CentOS Stream, and Windows Server.

    When creating a disk, you can only select a single snapshot schedule. After the disk is created, you can add a few more schedules by following this guide.

  12. Optionally, expand the Additional section and, in the Hardware generation field, select the virtualized hardware generation you want to assign to the new disk:

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

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

  13. Click Create disk.

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. View the description of the CLI command to create a disk:

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

    yc compute snapshot list
    

    Result:

    +----------------------+----------------------+----------------------+----------+
    |          ID          |         NAME         |     PRODUCT IDS      |  STATUS  |
    +----------------------+----------------------+----------------------+----------+
    | fd84hanhvjql******** | disk-1-1668075122980 | f2ef3frbftr2******** | READY    |
    | fd85mc22cosp******** | disk-2-1669114692462 | f2ef3frbftr2******** | READY    |
    +----------------------+----------------------+----------------------+----------+
    
  3. Select ID or NAME of the snapshot you need.

  4. Create a disk from the selected snapshot:

    yc compute disk create \
      --name <disk_name> \
      --source-snapshot-name <source_snapshot_name> \
      --zone <availability_zone> \
      --description <text_description_of_disk> \
      --hardware-generation-id <hardware_generation> \
      --hardware-features pci_topology=<PCI_topology>
    

    Where:

    • --name: Disk name. Follow these naming requirements:

      • 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-snapshot-name: Source snapshot name. Instead of a name, you can provide the source snapshot ID in the --source-snapshot-id parameter.

    • --zone: Availability zone of the new disk.

    • --description: Text description of the new disk. This is an optional parameter.

    • --hardware-generation-id: Hardware generation assigned to the disk. This is an optional parameter. Possible values:

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

      If not specified, the disk will get the same hardware generation assigned as the source snapshot.

    • --hardware-features: Additional settings for Gen 1. This is an optional parameter. Possible values:

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

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

    Result:

    done (44s)
    id: epdbnjirsai9********
    folder_id: b1gt6g8ht345********
    created_at: "2025-06-23T14:46:22Z"
    name: second-disk
    description: my second disk via yc
    type_id: network-hdd
    zone_id: ru-central1-a
    size: "21474836480"
    block_size: "4096"
    product_ids:
      - f2evcrm9ti79********
    status: READY
    source_snapshot_id: fd81qi89ldop********
    disk_placement_policy: {}
    hardware_generation:
      legacy_features:
        pci_topology: PCI_TOPOLOGY_V2
    

    For more information about the yc compute disk create command, see this 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 |   ru-central1-a   | READY  | a7lcvu28njbh******** |                 |             |
    | a7lv5j5hm1p1******** | second-disk  | 21474836480 |   ru-central1-a   | READY  |                      |                 |             |
    +----------------------+--------------+-------------+-------------------+--------+----------------------+-----------------+-------------+
    

    Get the same list with more details in YAML format:

    yc compute disk list --format yaml
    

    Result:

    - id: epd73ra2mrd4********
      folder_id: b1gt6g8ht345********
      created_at: "2025-06-23T16:57:01Z"
      name: first-disk
      description: my first disk
      type_id: network-hdd
      zone_id: ru-central1-a
      size: "21474836480"
      block_size: "4096"
      product_ids:
        - f2evcrm9ti79********
      status: READY
      source_snapshot_id: fd81qi89ldop********
      disk_placement_policy: {}
      hardware_generation:
        legacy_features:
          pci_topology: PCI_TOPOLOGY_V1
    - id: epd8lmcncidv********
      folder_id: b1gt6g8ht345********
      created_at: "2025-06-23T06:32:26Z"
      name: second-disk
      type_id: network-ssd
      zone_id: ru-central1-a
      size: "21474836480"
      block_size: "4096"
      product_ids:
        - f2evcrm9ti79********
      status: READY
      source_image_id: fd80j21lmqar********
      instance_ids:
        - epdm2ene322e********
      disk_placement_policy: {}
      hardware_generation:
        legacy_features:
          pci_topology: PCI_TOPOLOGY_V1
    

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

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

    Here is an example of the configuration file structure:

    resource "yandex_compute_disk" "my-disk" {
      name           = "<disk_name>"
      zone           = "<availability_zone>"
      snapshot_id    = "<snapshot_ID>"
      hardware_generation {
        legacy_features {
          pci_topology = "<PCI_topology>"
        }
      }
    }
    

    Where:

    • name: Disk name. Follow these naming requirements:

      • 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.
    • zone: Availability zone of the new disk.

    • snapshot_id: ID of the snapshot you are creating the disk based on.

    • hardware_generation: Settings describing the virtualized hardware generation assigned to the disk. This is an optional parameter. 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 disk will get the same hardware generation assigned as the source snapshot.

    For more information about the yandex_compute_disk 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. If the configuration does not contain any errors, 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 snapshots using the list REST API method for the Snapshot resource or the SnapshotService/List gRPC API call.
  2. Create a disk using the create REST API method for the Disk resource or the DiskService/Create gRPC API call. In your request, specify the source snapshot ID, and optionally the required hardware generation in the hardwareGeneration object (hardware_generation if using the gRPC API).

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

See alsoSee also

  • Creating a VM with disks from snapshots
  • Attaching a disk to a VM and mounting partitions
  • Creating a snapshot schedule
  • Encryption in Compute Cloud
  • Yandex Cloud Backup overview

Was the article helpful?

Previous
Creating a high-performance SSD
Next
Recovering a disk from an image
© 2025 Direct Cursus Technology L.L.C.