Skip to content

az vm show sku vs portal Operating system  #29269

@sc-draymond

Description

@sc-draymond

Describe the bug

The az vm show ".storageProfile.imageReference.sku" shows one value and the Azure portal a different value.

{
"scheduledEventsPolicy": null,
"scheduledEventsProfile": null,
"securityProfile": null,
"storageProfile": {
"dataDisks": [],
"diskControllerType": null,
"imageReference": {
"communityGalleryImageId": null,
"exactVersion": "17763.2114.2108051826",
"id": null,
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sharedGalleryImageId": null,
"sku": "2019-Datacenter",
"version": "latest"
}
}

image

Related command

az vm show --ids $id

Errors

No error message

Issue script & Debug output

DEBUG: cli.knack.cli: Command arguments: ['vm', 'show', '--ids', 'REMOVED', '--debug']
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 0x0000023C8EEEB880>, <function OutputProducer.on_global_arguments at 0x0000023C8F0760C0>, <function CLIQuery.on_global_arguments at 0x0000023C8F0A3C40>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'vm': ['azure.cli.command_modules.vm']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name Load Time Groups Commands
DEBUG: cli.azure.cli.core: vm 0.449 58 281
DEBUG: cli.azure.cli.core: Total (1) 0.449 58 281
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: Total (0) 0.000 0 0
DEBUG: cli.azure.cli.core: Loaded 58 groups, 281 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command : vm show
DEBUG: cli.azure.cli.core: Command table: vm show
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0000023C91F7E340>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\REMOVED.azure\commands\2024-06-27.12-06-39.vm_show.29844.log'.
INFO: az_command_data_logger: command args: vm show --ids {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x0000023C91FF07C0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x0000023C91FF0860>, <function register_cache_arguments..add_cache_arguments at 0x0000023C91FF09A0>]
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 0x0000023C8F076160>, <function CLIQuery.handle_query_parameter at 0x0000023C8F0A3CE0>, <function register_ids_argument..parse_ids_arguments at 0x0000023C91FF0900>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ComputeManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\REMOVED\.azure\service_principal_entries.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\REMOVED\.azure\msal_token_cache.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.binary_cache: load: C:\Users\REMOVED.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/REMOVED
DEBUG: msal.authority: openid_config("https://login.microsoftonline.com/REMOVED/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/REMOVED/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/REMOVED/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/REMOVED/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/REMOVED/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/REMOVED/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/REMOVED/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/REMOVED/kerberos', 'tenant_region_scope': 'OC', '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: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 6ccad73d-6830-40d7-b43f-ada65235f09e
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/REMOVED/providers/Microsoft.Compute/virtualMachines/REMOVED?api-version=2024-03-01'
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': '6192a3a2-34b8-11ef-be21-68545a97e98c'
DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'vm show'
DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.61.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-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/REMOVED/providers/Microsoft.Compute/virtualMachines/REMOVED?api-version=2024-03-01 HTTP/1.1" 200 4602
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
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': '4602'
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-ratelimit-remaining-resource': 'Microsoft.Compute/LowCostGetSubscriptionMaximum;23995,Microsoft.Compute/LowCostGetResource;33'
DEBUG: cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '66388591-10b1-4e42-99b8-448355b292c8'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'bc226ad1-ae08-4fe0-823d-a25dbd9a5064'
DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTUS:20240627T190640Z:bc226ad1-ae08-4fe0-823d-a25dbd9a5064'
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: DB48183B3994442A88BB6EA6FCD09CE3 Ref B: SJC211051205039 Ref C: 2024-06-27T19:06:40Z'
DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 27 Jun 2024 19:06:40 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {
"name": "REMOVED",
"id": "/subscriptions/REMOVED/providers/Microsoft.Compute/virtualMachines/REMOVED",
"type": "Microsoft.Compute/virtualMachines",
"location": "eastus",
"tags": {
"purpose": "REMOVED",
"contact": "REMOVED",
"owner": "REMOVED"
},
"identity": {
"type": "SystemAssigned",
"principalId": "b00f7c32-dee3-4ffc-9f19-33b15cda4839",
"tenantId": "REMOVED"
},
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D2as_v4"
},
"provisioningState": "Succeeded",
"vmId": "8b853139-90a9-4c30-a837-c723a595f420",
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest",
"exactVersion": "17763.2114.2108051826"
},
"osDisk": {
"osType": "Windows",
"name": "REMOVED_disk1_294d87d4ed544ed9816ebdc8351c9386",
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "StandardSSD_LRS",
"id": "/subscriptions/REMOVED/providers/Microsoft.Compute/disks/REMOVED_disk1_294d87d4ed544ed9816ebdc8351c9386"
},
"diskSizeGB": 127
},
"dataDisks": []
},
"osProfile": {
"computerName": "REMOVED",
"adminUsername": "REMOVED",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform",
"automaticByPlatformSettings": {
"bypassPlatformSafetyChecksOnUserSchedule": true
},
"assessmentMode": "AutomaticByPlatform",
"enableHotpatching": false
}
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"networkProfile": {"networkInterfaces":[{"id":"/subscriptions/REMOVED/providers/Microsoft.Network/networkInterfaces/REMOVED"}]},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
},
"timeCreated": "2021-08-23T19:52:26.3910015+00:00"
},
"resources": [
{
"name": "AADLoginForWindows",
"id": "/subscriptions/REMOVED/providers/Microsoft.Compute/virtualMachines/REMOVED/extensions/AADLoginForWindows",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "eastus",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Succeeded",
"publisher": "Microsoft.Azure.ActiveDirectory",
"type": "AADLoginForWindows",
"typeHandlerVersion": "1.0",
"settings": {"mdmId":""}
}
},
{
"name": "AzureMonitorWindowsAgent",
"id": "/subscriptions/REMOVED/providers/Microsoft.Compute/virtualMachines/REMOVED/extensions/AzureMonitorWindowsAgent",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "eastus",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Succeeded",
"publisher": "Microsoft.Azure.Monitor",
"type": "AzureMonitorWindowsAgent",
"typeHandlerVersion": "1.0"
}
},
{
"name": "AzureNetworkWatcherExtension",
"id": "/subscriptions/REMOVED/providers/Microsoft.Compute/virtualMachines/REMOVED/extensions/AzureNetworkWatcherExtension",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "eastus",
"properties": {
"autoUpgradeMinorVersion": true,
"provisioningState": "Succeeded",
"publisher": "Microsoft.Azure.NetworkWatcher",
"type": "NetworkWatcherAgentWindows",
"typeHandlerVersion": "1.4",
"settings": {}
}
}
]
}
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x0000023C91FB99E0>, <function x509_from_base64_to_hex_transform at 0x0000023C91FB9A80>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x0000023C91F7E5C0>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.main: Command ran in 2.600 seconds (init: 0.618, invoke: 1.982)
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 3645 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\REMOVED.azure"
INFO: telemetry.process: Return from creating process
INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior

The value returned from the az cli command to be something similar to "2022-datacenter-azure-edition-hotpatch"

Environment Summary

azure-cli 2.61.0

core 2.61.0
telemetry 1.1.0

Extensions:
application-insights 1.2.1
azure-devops 1.0.0

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

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/snapshotcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.potential-pruningquestionThe 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