-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Compute] az vm create
: Add new parameters --source-snapshots-or-disks
and --source-snapshots-or-disks-size-gb
to support implicit disk creation from snapshot and disk
#28949
Conversation
️✔️AzureCLI-FullTest
|
Hi @Jing-song, |
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
vm create | cmd vm create added parameter source_disk_restore_point_size_gb |
||
vm create | cmd vm create added parameter source_disk_restore_point |
||
vm create | cmd vm create added parameter source_snapshots_or_disks_size_gb |
||
vm create | cmd vm create added parameter source_snapshots_or_disks |
Compute |
az vm create
: Add new parameters --source-snapshots-or-disks
and --source-snapshots-or-disks-size-gb
to support implicit disk creation from snapshot and diskaz vm create
: Add new parameters --source-snapshots-or-disks
and --source-snapshots-or-disks-size-gb
to support implicit disk creation from snapshot and disk
while source_resource_copy: | ||
while i in used_luns: | ||
i += 1 | ||
|
||
used_luns.add(i) |
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.
This business logic seems difficult to understand~ Could you please add comments to explain it?
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.
It is an existing logic and also has comments
azure-cli/src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py
Lines 244 to 259 in bb30f28
# add attached data disks | |
i = 0 | |
attach_data_disks_copy = list(attach_data_disks) | |
while attach_data_disks_copy: | |
# get free lun | |
while i in used_luns: | |
i += 1 | |
used_luns.add(i) | |
# use free lun | |
info[i] = { | |
'lun': i, | |
'createOption': 'attach' | |
} | |
Related command
az vm create
Description
Implicit Disk Creation from Snapshot and Disk Restore Points
close #28686
Testing Guide
History Notes
[Compute]
az vm create
: Add new parameters--source-snapshots-or-disks
and--source-snapshots-or-disks-size-gb
to support implicit disk creation from snapshot and disk[Compute]
az vm create
: Add new parameters--source-disk-restore-point
and--source-disk-restore-point-size-gb
to support implicit disk creation from disk restore pointThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.