Skip to content

[EdgeZone] Unrecognized argument for "az vm list-skus" #28429

@viananth

Description

@viananth

Describe the bug

az vm list-skus documentation provides parameter for "EdgeZone" but it throws "Unrecognized argument" when using parameter "--edge-zone".
list-skus command should support "Edgezone" parameter.

Related command

az vm image list-skus --location
--offer
--publisher
[--edge-zone]

Errors

az vm list-skus -l westus --edge-zone losangeles
unrecognized arguments: --edge-zone

Examples from AI knowledge base:
az vm list-skus
Get details for compute-related resource SKUs. (autogenerated)

az vm list-skus --location eastus2 --zone --size standard_ds1
List all available vm sizes in the East US2 region which support availability zone with name like "standard_ds1...".

https://docs.microsoft.com/en-US/cli/azure/vm#az_vm_list_skus
Read more about the command in reference docs

Issue script & Debug output

az vm list-skus -l westus --edge-zone losangeles --debug
cli.knack.cli: Command arguments: ['vm', 'list-skus', '-l', 'westus', '--edge-zone', 'losangeles', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x01E219D8>, <function OutputProducer.on_global_arguments at 0x02148AC8>, <function CLIQuery.on_global_arguments at 0x0216C898>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'vm': ['azure.cli.command_modules.vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: vm 0.440 58 279
cli.azure.cli.core: Total (1) 0.440 58 279
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 58 groups, 279 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : vm list-skus
cli.azure.cli.core: Command table: vm list
cli.azure.cli.core: remaining : skus
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x043326B8>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\viananth.azure\commands\2024-02-21.15-40-51.vm_list-skus.8548.log'.
az_command_data_logger: command args: vm list-skus -l {} --edge-zone {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x04390AC8>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x04390A78>, <function register_cache_arguments..add_cache_arguments at 0x04390B68>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.azure.cli.core.command_recommender: "--edge-zone" is an invalid parameter for command "vm list-skus".
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22vm+list-skus%22%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.57.0%22%2C+%22errorType%22%3A+%22UnrecognizedArguments%22%2C+%22correlationId%22%3A+%22384e14ec-f409-41ef-a6e4-03fea6af4e53%22%2C+%22subscriptionId%22%3A+%221d85fdce-f71c-4ecd-a06d-ea46effcccd0%22%2C+%22eventId%22%3A+%2234156124-587d-4e7d-a439-a4247c92b5f0%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.command_recommender: "--edge-zone" is an invalid parameter for command "vm list-skus".
cli.azure.cli.core.azclierror: NoneType: None

cli.azure.cli.core.azclierror: unrecognized arguments: --edge-zone losangeles
az_command_data_logger: unrecognized arguments: --edge-zone losangeles

Examples from AI knowledge base:
az vm list-skus
Get details for compute-related resource SKUs. (autogenerated)

az vm list-skus --location eastus2 --zone --size standard_ds1
List all available vm sizes in the East US2 region which support availability zone with name like "standard_ds1...".

https://docs.microsoft.com/en-US/cli/azure/vm#az_vm_list_skus
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x043327F8>]
az_command_data_logger: exit code: 2
cli.main: Command ran in 2.108 seconds (init: 0.794, invoke: 1.314)
cli.azure.cli.core.decorators: Suppress exception:
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 62, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 50, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/main.py", line 36, in cli_main
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 250, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 589, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/parser.py", line 261, in parse_args
File "argparse.py", line 1872, in parse_args
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/parser.py", line 175, in error
File "argparse.py", line 2617, in exit
SystemExit: 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/decorators.py", line 79, in _wrapped_func
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/telemetry.py", line 532, in _get_secrets_warning_config
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/config.py", line 147, in getboolean
ValueError: Not a boolean: None

telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3608 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\viananth.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

list-skus command should support --edge-zone parameter and should filter the skus based on the provided edgezone.

Environment Summary

az -v
azure-cli 2.57.0

core 2.57.0
telemetry 1.1.0

Extensions:
aks-preview 0.5.171
azure-devops 0.26.0
image-copy-extension 0.2.13
k8s-extension 1.5.2

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\viananth.azure\cliextensions'

Python (Windows) 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:13:08) [MSC v.1937 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotact-observability-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions