Skip to content

[CLI] Implicit Disk Creation from Snapshot and Disk Restore Points for already created VMs (not new VMs) - Single VMs, VMs in an AvSet, VMs in VMSS #31676

@vishalprayag24

Description

@vishalprayag24

Preconditions

  • No need to upgrade Python SDK or the Python SDK is ready.

Related command

No response

Resource Provider

Microsoft.Compute/VirtualMachines

Description of Feature or Work Requested

Note that this feature is currently supported for new VM creation (az vm create) and here is the work-item for that - #28686. This work-item is to improve attach disk created from snapshot / Disk Restore Points to existing VM (az vm disk attach)

When a new managed disk is created from an incremental snapshot, the system initiates a background copy to transfer data from the incremental snapshot to the new disk. If the same disk is later attached to a VM in an Availability Set or a Virtual Machine Scale Set (VMSS), an additional background copy may be triggered to align the disk with the appropriate VM fault domain. It is generally recommended to avoid multiple background copy operations for the same disk. Repeated data movement can lead to temporary distribution of disk data across different storage locations in the backend, which may impact performance and reliability due to increased latency and a larger operational surface area.

Image

Premium SSD v2 and Ultra Disks support only one background copy operation at a time. When a disk is created from an incremental snapshot, a background copy is triggered. If the disk is then attached to a virtual machine and it initiates another background copy, the attach operation will fail if the first copy is still in progress.

To optimize background copy operations and improve reliability, the system now supports creating a managed disk from an incremental snapshot and attaching it to a virtual machine in a single step. The virtual machine can be part of an Availability Set, a Virtual Machine Scale Set (VMSS), or a standalone instance. This capability ensures that the disk is placed directly in the appropriate fault domain when needed, eliminating the need for a second background copy. This enhancement reduces the number of background copy operations per disk and aligns with best practices for performance and reliability.

Image

Minimum API Version Required

2024-03-01

Swagger PR link / SDK link

https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01

https://github.com/Azure/azure-rest-api-specs/pull/27480/commits

Request Example

No response

Target Date

By July 10 2025

PM Contact

vishalprayag

Engineer Contact

linugeorge

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotfeature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions