Skip to content

Conversation

Copy link

Copilot AI commented Nov 17, 2025

Description

Exposes Azure SDK's existing Disk Availability Policy feature through PowerShell cmdlets, enabling configuration of VM behavior when disks experience I/O degradation.

Changes

  • Models: Added AvailabilityPolicy property to PSDisk and PSDiskUpdate
  • Cmdlets: Added -ActionOnDiskDelay parameter to New-AzDiskConfig and New-AzDiskUpdateConfig
    • Values: None (VM restarts on slow I/O) | AutomaticReattach (detach/reattach disk on I/O failure)
    • Includes PSArgumentCompleter for input validation
  • Tests: Added Test-DiskAvailabilityPolicy covering create and update scenarios
  • Documentation: Updated ChangeLog.md

Usage

# Create disk with automatic reattachment on I/O issues
$config = New-AzDiskConfig -Location "EastUS" -DiskSizeGB 5 `
    -SkuName Standard_LRS -CreateOption Empty `
    -ActionOnDiskDelay 'AutomaticReattach'
New-AzDisk -ResourceGroupName "rg" -DiskName "disk" -Disk $config

# Update existing disk policy
$update = New-AzDiskUpdateConfig -ActionOnDiskDelay 'None'
Update-AzDisk -ResourceGroupName "rg" -DiskName "disk" -Disk $update

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 1mcvsblobprodwus2174.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • 1n8vsblobprodwus2184.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • 2d2vsblobprodwus2127.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • 40vvsblobprodwus2135.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • 5azvsblobprodwus2162.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • 5o1vsblobprodwus2115.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • 6yfvsblobprodwus2121.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • 7t8vsblobprodwus2168.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • 84hvsblobprodwus2148.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • 8wdvsblobprodwus2137.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • b15vsblobprodwus2164.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • b53vsblobprodwus2154.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • ba0vsblobprodwus2130.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • balvsblobprodwus2129.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • cbvvsblobprodwus2131.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • cffvsblobprodwus218.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • d94vsblobprodwus2119.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • ezcvsblobprodwus2170.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • faxvsblobprodwus2122.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • g3xvsblobprodwus2151.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • h8evsblobprodwus2120.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • i01vsblobprodwus216.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • ia4vsblobprodwus2112.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • isvvsblobprodwus2147.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • jhgvsblobprodwus2167.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • jqivsblobprodwus2187.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • k4pvsblobprodwus2140.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • kafvsblobprodwus2165.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • ldhvsblobprodwus2153.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • mt2vsblobprodwus2110.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • nudvsblobprodwus214.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • ox9vsblobprodwus2149.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • p2tvsblobprodwus2189.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • tn2vsblobprodwus2124.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • vd2vsblobprodwus2150.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • vm9vsblobprodwus2190.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • wlnvsblobprodwus2188.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • x0dvsblobprodwus2111.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • xofvsblobprodwus2114.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • y1rvsblobprodwus2136.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • y5lvsblobprodwus2179.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • yf8vsblobprodwus212.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Azure.PowerShell.sln -c Debug -fl /flp1:logFile=/home/REDACTED/work/azure-powershell/azure-powershell/artifacts/Build.log;verbosity=quiet (dns block)
  • zaxvsblobprodwus215.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)
  • zugvsblobprodwus2169.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet build /home/REDACTED/work/azure-powershell/azure-powershell/tools/VersionController/VersionController.Netcore.csproj -c Debug (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>{ Az.Compute} - {Disk Availability Policy}</issue_title>
<issue_description>

Guidelines

The purpose of the Azure PowerShell design review is to ensure that the cmdlets follow the same pattern across the Azure modules. An early design review reduces the risk of unnecessary implementation changes caused by a cmdlet syntax design change.

Please ensure your cmdlets comply with the design guidelines outlined in the PowerShell Design Guidelines document.

Please generate cmdlets syntax using GenerateCmdletDesignMarkdown.ps1 for review if your cmdlet is generated from API spec directly by Autorest.PowerShell.

Create

$rgname =
$loc =
New-AzResourceGroup -Name $rgname -Location $loc -Force

$diskName =
$diskConfig = New-AzDiskConfig -ActionOnDiskDelay 'AutomaticReattach' -Disk $diskConfig
$disk = Get-AzDisk -ResourceGroupName $rgname -DiskName $diskName

Update
New-AzDiskUpdateConfig -ActionOnDiskDelay 'None' | Update-AzDisk -ResourceGroupName $rgname -DiskName $diskName;

If you just add parameter to existing cmdlets and parameter definition complies with guideline, the design review is not expected.

  • Have you read above statement?

    • { Yes}

Service Release Details

  • Is this an Embargoed Preview, A Public Preview, or a General Release?

    • { Public Preview }
  • What is the expected service release date?

    • { 10/2 }
  • Which Powershell module are these changes being made in?

    • { Az.Compute }

Contact Information

  • Main developer contacts (emails + github aliases)

    • { pramb }
  • PM contact (email + github alias)

    • { vimohand }
  • Other people who should attend a design review (email)

    • { vikramd }

High Level Scenarios

  • Describe how your feature is intended to be used by customers.

    • { properties.availabilityPolicy.actionOnDiskDelay. Values: None and AutomaticReAttach}
  • Piping scenarios / how these cmdlets are used with existing cmdlets

  • Sample of end-to-end usage

    • Please provide comprehensive examples that don't assume additional setup. It helps the audience understand your feature.

    • { New-AzDiskConfig -availabilityPolicy.actionOnDiskDelay "AutomaticReattach" }

Syntax changes

Indicate if you are requesting an edit to existing cmdlets, adding new cmdlets, or both. Then edit the corresponding section below.

- { Existing }

New Cmdlet

List the new cmdlet names.

- { }

List the parameters for the new cmdlet(s) and the parameter types.

- { h}

Please describe the business logic of the cmdlet and parameters here.

- { Cmdlet and parameter business logic }

Link to cmdlet help markdown file generated by platyPS or sample syntax. The below is an example.:

PS C:\> Get-AzureRmWidget [[-ResourceGroupName] <resourceGroupName>] [[-Name] <name>] [-Detail]
 
ResourceGroup | WidgetName |
--------------|------------|
 rg1          |  widget1   |

Changed cmdlet

List the names of the cmdlets that are being edited.

- { List the names here }

List the new parameters for the cmdlet, the parameter types, and their allowed values if applicable.

- { List the cmdlets and their parameters here }

Please describe the new business logic of the cmdlet and parameters here.

- { Cmdlet and parameter business logic }

Link to diff between markdown help files, or sample syntax as above.

- { CHANGED CMDLETS HERE }

Indicate which parameter sets on the cmdlet are affected by this change.

- { INPUT HERE }

Specific test cases

Please provide a link to the API tests that exist for this feature.

  • { [Azure/azure-rest-api-specs#34917](https://github.com/Azure/azure-rest-api-specs/pull/34917)}

Additional information

  • Link to the OpenAPI (swagger) spec -

    • { LINK HERE }
  • Link to any other Github work related to this request

    • { LINK HERE }
  • Indicate any feature flags or restrictions on the changes provided in this design specification.

For example:
   ...

</details>


> **Custom agent used: Powershell PR agent**
> This agent creates a Powershell PR

- Fixes Azure/azure-powershell-cmdlet-review-pr#1512

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
Copilot AI changed the title [WIP] Add cmdlets for disk availability policy in Azure Compute Add Disk Availability Policy support to Az.Compute Nov 17, 2025
Copilot AI requested a review from audreyttt November 17, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants