Skip to content

Conversation

Jing-song
Copy link
Contributor

@Jing-song Jing-song commented Jul 30, 2025

Related command

az snapshot create

Description

Instant Access Snapshot for Premium SSD v2 and Ultra Disk
close: #31717
AAZ: Azure/aaz#836

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Copy link

azure-client-tools-bot-prd bot commented Jul 30, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

Copy link

azure-client-tools-bot-prd bot commented Jul 30, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd snapshot create cmd snapshot create added parameter instant_access_duration_minutes

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 30, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@Jing-song
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Jing-song Jing-song marked this pull request as ready for review August 25, 2025 02:43
@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 02:43
Copy link
Contributor

@Copilot Copilot AI left a 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 support for creating instant access snapshots for Premium SSD v2 and Ultra Disk by introducing a new --enable-instant-access parameter to the az snapshot create command.

  • Adds a new test case to verify the --enable-instant-access functionality
  • Updates test recordings to reflect the new parameter usage
  • Adds test skips for failing tests unrelated to the main feature

Reviewed Changes

Copilot reviewed 15 out of 30 changed files in this pull request and generated 1 comment.

File Description
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py Adds new test for instant access snapshot functionality and skips failing tests
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_snapshot_incremental.yaml Updates recorded HTTP interactions with API version changes and new response fields

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 1637 to 1644
self.kwargs.update({
'disk': self.create_random_name('disk', 15),
'snapshot': self.create_random_name('snapshot', 15)
})
self.cmd('disk create -g {rg} -n {disk} --size-gb 10 --sku UltraSSD_LRS')
self.cmd('snapshot create -g {rg} -n {snapshot} --enable-instant-access 300 --incremental true --source {disk}', checks=[
self.check('incremental', True),
self.check('creationData.instantAccessDurationMinutes', 300)
Copy link
Preview

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The command uses a hard-coded value of 300 for the instant access duration. Consider using a variable or constant to make the test more maintainable and self-documenting about what this value represents (e.g., duration in minutes).

Suggested change
self.kwargs.update({
'disk': self.create_random_name('disk', 15),
'snapshot': self.create_random_name('snapshot', 15)
})
self.cmd('disk create -g {rg} -n {disk} --size-gb 10 --sku UltraSSD_LRS')
self.cmd('snapshot create -g {rg} -n {snapshot} --enable-instant-access 300 --incremental true --source {disk}', checks=[
self.check('incremental', True),
self.check('creationData.instantAccessDurationMinutes', 300)
instant_access_duration_minutes = 300
self.kwargs.update({
'disk': self.create_random_name('disk', 15),
'snapshot': self.create_random_name('snapshot', 15)
})
self.cmd('disk create -g {rg} -n {disk} --size-gb 10 --sku UltraSSD_LRS')
self.cmd(f'snapshot create -g {{rg}} -n {{snapshot}} --enable-instant-access {instant_access_duration_minutes} --incremental true --source {{disk}}', checks=[
self.check('incremental', True),
self.check('creationData.instantAccessDurationMinutes', instant_access_duration_minutes)

Copilot uses AI. Check for mistakes.

@Jing-song Jing-song changed the title [Compute] az snapshot create: Add new parameter --enable-instant-access to support creating instant access snapshot for premium SSD v2 and ultra disk [Compute] az snapshot create: Add new parameter --instant-access-duration-minutes to support creating instant access snapshot for premium SSD v2 and ultra disk Aug 25, 2025
@yanzhudd
Copy link
Contributor

License check: @microsoft-github-policy-service rerun

@yanzhudd
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Jing-song Jing-song marked this pull request as draft August 26, 2025 01:36
@Jing-song Jing-song marked this pull request as ready for review August 26, 2025 02:26
@Jing-song Jing-song marked this pull request as draft August 26, 2025 02:48
@Jing-song Jing-song marked this pull request as ready for review August 26, 2025 02:49
@yanzhudd yanzhudd merged commit 441e4ce into Azure:dev Aug 26, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI Support - Instant Access Snapshot for Premium SSD v2 and Ultra Disk
4 participants