-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add PerDiskAlignment property and BestEffortAlignment to Storage Alignment #39092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/cplat-2025-11-01
Are you sure you want to change the base?
Add PerDiskAlignment property and BestEffortAlignment to Storage Alignment #39092
Conversation
Next Steps to MergeImportant checks have failed. As of today they are not blocking this PR, but in near future they may.Addressing the following failures is highly recommended:
Comment generated by summarize-checks workflow run. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
|
|
@alerothhhh please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
| /** | ||
| * Specifies the storage fault domain alignment type for the disk. | ||
| */ | ||
| union StorageFaultDomainAlignmentType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above this line please add version tag: @added(Versions.v2025_11_01)
| /** | ||
| * Specifies the storage alignment status for the disk. | ||
| */ | ||
| union StorageAlignment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version tag needed here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swagger files should be generated using the instructions here: (example will be generated too) https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/73164/TypeSpec-(API-Definitions)?anchor=generating-swagger
…om/Azure/azure-rest-api-specs into alroth/perDiskAlignment_2025-11-01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds storage fault domain alignment capabilities to the Azure Compute API for VMs and VM Scale Sets. The changes introduce new alignment types to help users specify how storage should be aligned with fault domains, providing more granular control over VM placement and storage reliability characteristics.
Key Changes
- Adds
BestEffortAlignedoption toZonalPlatformFaultDomainAlignModeenum for flexible alignment scenarios - Introduces two new union types:
StorageFaultDomainAlignmentType(for configuration) andStorageAlignment(for runtime status) - Extends disk models across VMs and VMSS with the
storageFDAlignmentproperty to allow users to specify alignment preferences during resource creation and updates
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| specification/compute/Compute.Management/models.tsp | Defines new storage alignment union types and adds storageFDAlignment property to all disk models (DataDisk, OSDisk, VMSS variants) and storageAlignment to DiskInstanceView for runtime status |
| specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-11-01/ComputeRP.json | OpenAPI specification generated from TypeSpec, includes enum definitions and property additions consistent with the TypeSpec source |
| specification/compute/Compute.Management/examples/2025-11-01/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithStorageFDAlignment.json | Example demonstrating VMSS creation with BestEffortAligned storage fault domain alignment on the OS disk |
|
|
||
| /** | ||
| * Specifies the storage alignment status for the disk. | ||
| */ |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The storageAlignment property added to DiskInstanceView is missing the @added(Versions.v2025_11_01) decorator. All other new properties added in this PR (storageFDAlignment on disk models) include this decorator to indicate they were introduced in version 2025-11-01. For consistency, this property should also include the decorator:
/**
* Specifies the storage alignment status for the disk.
*/
@added(Versions.v2025_11_01)
storageAlignment?: StorageAlignment;| */ | |
| */ | |
| @added(Versions.v2025_11_01) |
| "location": "westus", | ||
| "type": "Microsoft.Compute/virtualMachineScaleSets", | ||
| "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" | ||
| } |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example is missing the 201 response for the create operation. According to the OpenAPI specification, the VirtualMachineScaleSets_CreateOrUpdate operation returns both 200 (for update) and 201 (for create) status codes. Most other VMSS create examples include both responses to demonstrate the complete API behavior.
Additionally, the PR description mentions "StorageFDAlignment is not a updatable property, hence not including" the 201 response. However, the storageFDAlignment property is present in the VirtualMachineScaleSetUpdateOSDisk model (line 3894 in models.tsp), which means it IS updatable. The example should include both response codes for consistency with the API specification and other examples.
| } | |
| } | |
| }, | |
| "201": { | |
| "body": { | |
| "sku": { | |
| "tier": "Standard", | |
| "capacity": 3, | |
| "name": "Standard_D1_v2" | |
| }, | |
| "name": "{vmss-name}", | |
| "properties": { | |
| "overprovision": true, | |
| "virtualMachineProfile": { | |
| "storageProfile": { | |
| "imageReference": { | |
| "sku": "2016-Datacenter", | |
| "publisher": "MicrosoftWindowsServer", | |
| "version": "latest", | |
| "offer": "WindowsServer" | |
| }, | |
| "osDisk": { | |
| "caching": "ReadWrite", | |
| "managedDisk": { | |
| "storageAccountType": "Standard_LRS" | |
| }, | |
| "createOption": "FromImage", | |
| "storageFDAlignment": "BestEffortAligned" | |
| } | |
| }, | |
| "osProfile": { | |
| "computerNamePrefix": "{vmss-name}", | |
| "adminUsername": "{your-username}", | |
| "adminPassword": "{your-password}" | |
| }, | |
| "networkProfile": { | |
| "networkInterfaceConfigurations": [ | |
| { | |
| "name": "{vmss-name}", | |
| "properties": { | |
| "primary": true, | |
| "enableIPForwarding": true, | |
| "ipConfigurations": [ | |
| { | |
| "name": "{vmss-name}", | |
| "properties": { | |
| "subnet": { | |
| "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "upgradePolicy": { | |
| "mode": "Manual" | |
| }, | |
| "scheduledEventsPolicy": { | |
| "scheduledEventsAdditionalPublishingTargets": { | |
| "eventGridAndResourceGraph": { | |
| "enable": true | |
| } | |
| }, | |
| "userInitiatedRedeploy": { | |
| "automaticallyApprove": true | |
| }, | |
| "userInitiatedReboot": { | |
| "automaticallyApprove": true | |
| } | |
| }, | |
| "provisioningState": "Creating", | |
| "zonalPlatformFaultDomainAlignMode": "Aligned" | |
| }, | |
| "location": "westus", | |
| "type": "Microsoft.Compute/virtualMachineScaleSets", | |
| "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" | |
| } |
Notes:
Questions:
What this does:
Example:
shows creation of a Aligned VMSS with disk having BestEffortAligned StorageFdAlignment
ARM (Control Plane) API Specification Update Pull Request
Tip
Overwhelmed by all this guidance? See the
Getting helpsection at the bottom of this PR description.PR review workflow diagram
Please understand this diagram before proceeding. It explains how to get your PR approved & merged.
Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!
Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.
Additional information
Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the
Generated ApiViewcomment added to this PR. You can use ApiView to show API versions diff.Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.
Getting help
Purpose of this PRandDue diligence checklist.write accessper aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositoriesNext Steps to Mergecomment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.and https://aka.ms/ci-fix.
queuedstate, please add a comment with contents/azp run.This should result in a new comment denoting a
PR validation pipelinehas started and the checks should be updated after few minutes.