Azure / Azure/azure-powershell
[Doc]: Get-AzVmSize is not properly working for newer VM-series - this should be added to the docs
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Type of issue
Missing information
### Feedback
The Cmdlet "Get-AzVmSize" has wrong data disk information for newer v6 series VM SKUs.
This could be reproduced with this code snippet:
Get-AzVMSize -Location "westeurope" | Where-Object {($_.Name -like "*ds_v6") -and ($_.ResourceDiskSizeInMb -eq 0)} | Select-Object Name,ResourceDiskSizeInMB
ResourceDiskSizeInMB will be 0, although these VMs have a data disk (larger than 0).
The Cmdlet is using this API:
https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes
According to the API docs (found here: https://learn.microsoft.com/en-us/rest/api/compute/virtual-machine-sizes/list?view=rest-compute-2024-11-04&tabs=HTTP) the API is deprecated. This will be the reason why it does not work with latest SKUs.
Please add a hint to the docs that:
- The Cmdlet will not work correctly with latest VM skus
- One should use Get-AzComputeResourceSku instead as it uses a newer API
### Page URL
https://learn.microsoft.com/en-us/powershell/module/az.compute/get-azvmsize?view=azps-13.3.0
### Content source URL
https://github.com/Azure/azure-powershell/blob/main/src/Compute/Compute/help/Get-AzVMSize.md
### Author
@mikefrobbins
### Document Id
9c12b5d4-2e9e-4170-f45b-5e3b136c607f
Contributor guide
Assessment
This issue has not been assessed yet.