Skip to content
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] disk create: add --disk-iops-read-only, --disk-mbps-read-only, --max-shares, --image-reference, --image-reference-lun, --gallery-image-reference, --gallery-image-reference-lun #12618

Merged
merged 24 commits into from
Mar 30, 2020

Conversation

qwordy
Copy link
Member

@qwordy qwordy commented Mar 17, 2020

#12380

Changes:
--disk-iops-read-only
The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes

--disk-mbps-read-only
The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10

--image-reference
ID or URN (publisher:offer:sku:version) of the image from which to create a disk

--image-reference-lun
If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null

--gallery-image-reference
ID of the shared galley image version from which to create a disk

--gallery-image-reference-lun
If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null

--max-shares
The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time

Examples:

az disk create -g rg -n disk --size-gb 10 --sku UltraSSD_LRS --disk-iops-read-only 200 --disk-mbps-read-only 30
az disk create -g rg -n disk --image-reference /Subscriptions/<subs_id>/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/UbuntuServer/Skus/18.04-LTS/Versions/18.04.202002180
az disk create -g rg -n disk --image-reference Canonical:UbuntuServer:18.04-LTS:18.04.202002180
az disk create -g rg -n disk --gallery-image-reference /subscriptions/<subs_id>/resourceGroups/<rg_id>/providers/Microsoft.Compute/galleries/gallery/images/image/versions/1.0.0
az disk create -g rg -n disk --size-gb 256 --max-shares 2 -l centraluseuap

History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)

[Compute] upgrade disk API version to 2019-11-01
[Compute] disk create: add --disk-iops-read-only, --disk-mbps-read-only, --max-shares, --image-reference, --image-reference-lun, --gallery-image-reference, --gallery-image-reference-lun


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

@qwordy qwordy requested a review from yungezz March 17, 2020 07:19
@yungezz yungezz added this to the S167 milestone Mar 17, 2020
Copy link
Contributor

@haroldrandom haroldrandom left a comment

Choose a reason for hiding this comment

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

Core LGTM.

@haroldrandom
Copy link
Contributor

No YAML re-recording?

@qwordy
Copy link
Member Author

qwordy commented Mar 18, 2020

No YAML re-recording?

in progress

@@ -127,7 +127,7 @@ def default_api_version(self):
ResourceType.MGMT_NETWORK: '2019-11-01',
ResourceType.MGMT_COMPUTE: SDKProfile('2019-07-01', {
'resource_skus': '2019-04-01',
'disks': '2019-07-01',
'disks': '2019-11-01',
Copy link
Member

Choose a reason for hiding this comment

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

have we done full regression :)

Copy link
Member Author

Choose a reason for hiding this comment

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

underway

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Can't guarantee no error in live test. But no new error in disk related tests.

c.argument('max_shares', type=int, help='The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time')
c.argument('disk_iops_read_only', type=int, help='The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes')
c.argument('disk_mbps_read_only', type=int, help='The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10')
c.argument('image_reference', help='ID of the image from which to create a disk')
Copy link
Member

Choose a reason for hiding this comment

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

support name?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. Plan to support ID, name, URN

Copy link
Member Author

Choose a reason for hiding this comment

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

Support ID and URN now. Name (custom image) is not support by service.

@yungezz yungezz added Compute az vm/vmss/image/disk/snapshot Compute - Managed Disks az disk labels Mar 27, 2020
Copy link
Member

@yungezz yungezz left a comment

Choose a reason for hiding this comment

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

pls add examples in _help.py, thanks.

@qwordy qwordy merged commit 89ad796 into Azure:dev Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compute - Managed Disks az disk Compute az vm/vmss/image/disk/snapshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants