Skip to content

Extension Stack-HCI-VM version 1.10.2 api version issues for querying resources. #8949

@brmcsorley

Description

@brmcsorley

Describe the bug

Trying to use extension stack-hci-vm in a github action. Each run installs the latest version, which no longer works to query resources due to api version issues.

Workaround is to have step in github action install 1.9.1 for now.

Related command

az stack-hci-vm network lnet list

az stack-hci-vm image list

Errors

The resource type 'logicalNetworks' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version '2025-06-01-preview'.

The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version '2025-06-01-preview'.

Issue script & Debug output

az : DEBUG: cli.knack.cli: Command arguments: ['stack-hci-vm', 'image', 'list', '--debug']
At line:1 char:1

  • az stack-hci-vm image list --debug
  •   + CategoryInfo          : NotSpecified: (DEBUG: cli.knac...st', '--debug']:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

DEBUG: cli.knack.cli: init debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001F46BB8B880>, <function OutputProducer.on_global_arguments at
0x000001F46BD16020>, <function CLIQuery.on_global_arguments at 0x000001F46BD43BA0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'stack-hci-vm': ['azext_stack_hci_vm']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands
DEBUG: cli.azure.cli.core: Total (0) 0.000 0 0
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory
DEBUG: cli.azure.cli.core: stack-hci-vm 0.113 11 53 C:\Users\464688.azure\cliextensions\stack-hci-vm
DEBUG: cli.azure.cli.core: Total (1) 0.113 11 53
DEBUG: cli.azure.cli.core: Loaded 11 groups, 53 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command : stack-hci-vm image list
DEBUG: cli.azure.cli.core: Command table: stack-hci-vm image list
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001F46EBA6020>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\464688.azure\commands\2025-07-08.11-32-21.stack-hci-vm_image_list.18012.log'.
INFO: az_command_data_logger: command args: stack-hci-vm image list --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000001F46EC0C4A0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001F46EC0C540>, <function
register_cache_arguments..add_cache_arguments at 0x000001F46EC0C680>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001F46BD160C0>, <function CLIQuery.handle_query_parameter at
0x000001F46BD43C40>, <function register_ids_argument..parse_ids_arguments at 0x000001F46EC0C5E0>]
INFO: az_command_data_logger: extension name: stack-hci-vm
INFO: az_command_data_logger: extension version: 1.10.2
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=AzureStackHCIClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\464688\.azure\msal_token_cache.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.binary_cache: load: C:\Users\464688.azure\msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f
DEBUG: msal.authority: openid_config("https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/v2.0/.well-known/openid-configuration") = {'token_endpoint':
'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt',
'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment',
'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token
token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/v2.0',
'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint':
'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/authorize', 'device_authorization_endpoint':
'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True,
'end_session_endpoint': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name',
'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash',
'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com',
'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? None
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=AzureStackHCIClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f
DEBUG: msal.authority: openid_config("https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/v2.0/.well-known/openid-configuration") = {'token_endpoint':
'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt',
'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment',
'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token
token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/v2.0',
'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint':
'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/authorize', 'device_authorization_endpoint':
'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True,
'end_session_endpoint': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name',
'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash',
'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/1318d57f-757b-45b3-b1b0-9b3c3842774f/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com',
'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
DEBUG: msal.application: Broker enabled? None
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 9ba2aaf2-097d-4e76-bf6d-bb28174464c7
DEBUG: cli.azure.cli.core.sdk.policies: Request URL:
'https://management.azure.com/subscriptions/10a36aa0-966f-4b22-829e-4ce466f0e926/providers/Microsoft.AzureStackHCI/galleryImages?api-version=2025-06-01-preview'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'bd2a1a38-5c10-11f0-90c7-10a51d0473a0'
DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'stack-hci-vm image list'
DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--debug'
DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.60.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.22621-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET
/subscriptions/10a36aa0-966f-4b22-829e-4ce466f0e926/providers/Microsoft.AzureStackHCI/galleryImages?api-version=2025-06-01-preview HTTP/1.1" 404 459
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 404
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Length': '459'
DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies: 'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '78a9dc7a-084a-446f-9553-f634560ba7b8'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '78a9dc7a-084a-446f-9553-f634560ba7b8'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTUS:20250708T153221Z:78a9dc7a-084a-446f-9553-f634560ba7b8'
DEBUG: cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 6B7F11BD4D634EC8907A2AA60F5E30B0 Ref B: BL2AA2010205007 Ref C: 2025-07-08T15:32:21Z'
DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 08 Jul 2025 15:32:21 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidResourceType","message":"The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for
api version '2025-06-01-preview'. The supported api-versions are '2020-11-01-preview,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01
,2024-02-01-preview,2024-05-01-preview,2024-08-01-preview,2024-10-01-preview,2025-02-01-preview,2025-04-01-preview'."}}
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
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 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\464688.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\generated\custom.py", line 60, in stackhcivm_image_list
return list(itertools.chain(gallery_images, marketplace_gallery_images))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 123, in next
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 75, in next
File "C:\Users\464688.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2025_06_01_preview\operations_gallery_images_operations.py", line 332, in get_next
map_error(status_code=response.status_code, response=response, error_map=error_map)
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/exceptions.py", line 112, in map_error
azure.core.exceptions.ResourceNotFoundError: (InvalidResourceType) The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version
'2025-06-01-preview'. The supported api-versions are '2020-11-01-preview,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01,2024-02-01-
preview,2024-05-01-preview,2024-08-01-preview,2024-10-01-preview,2025-02-01-preview,2025-04-01-preview'.
Code: InvalidResourceType
Message: The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version '2025-06-01-preview'. The supported api-versions are '2020-11-01-prev
iew,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01,2024-02-01-preview,2024-05-01-preview,2024-08-01-preview,2024-10-01-preview,2025
-02-01-preview,2025-04-01-preview'.
ERROR: cli.azure.cli.core.azclierror: (InvalidResourceType) The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version
'2025-06-01-preview'. The supported api-versions are '2020-11-01-preview,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01,2024-02-01-
preview,2024-05-01-preview,2024-08-01-preview,2024-10-01-preview,2025-02-01-preview,2025-04-01-preview'.
Code: InvalidResourceType
Message: The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version '2025-06-01-preview'. The supported api-versions are '2020-11-01-prev
iew,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01,2024-02-01-preview,2024-05-01-preview,2024-08-01-preview,2024-10-01-preview,2025
-02-01-preview,2025-04-01-preview'.
ERROR: az_command_data_logger: (InvalidResourceType) The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version '2025-06-01-preview'.
The supported api-versions are '2020-11-01-preview,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01,2024-02-01-preview,2024-05-01-pre
view,2024-08-01-preview,2024-10-01-preview,2025-02-01-preview,2025-04-01-preview'.
Code: InvalidResourceType
Message: The resource type 'galleryImages' could not be found in the namespace 'Microsoft.AzureStackHCI' for api version '2025-06-01-preview'. The supported api-versions are '2020-11-01-prev
iew,2021-07-01-preview,2021-09-01-preview,2022-12-15-preview,2023-07-01-preview,2023-09-01-preview,2024-01-01,2024-02-01-preview,2024-05-01-preview,2024-08-01-preview,2024-10-01-preview,2025
-02-01-preview,2025-04-01-preview'.
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001F46EBA62A0>]
INFO: az_command_data_logger: exit code: 3
INFO: cli.main: Command ran in 1.264 seconds (init: 0.353, invoke: 0.912)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 4616 in cache
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft
SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init
.pyc C:\Users\464688.azure"
INFO: telemetry.process: Return from creating process
INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior

Return a list of logical networks and vm images.

Environment Summary

azure-cli 2.60.0

core 2.60.0
telemetry 1.1.0

Extensions:
azurestackhci 0.2.9
k8s-extension 1.6.3
stack-hci-vm 1.10.2

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.0b2

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

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AzureStackHCIService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions