Skip to content

adding extra backslash u0000 on az vm boot-diagnostics get-boot-log  #29890

Description

@gderbas86

Describe the bug

When you use the Azure CLI command az vm boot-diagnostics get-boot-log --ids /subscriptions/XXXXXX/resourceGroups/XXXx/providers/Microsoft.Compute/virtualMachines/xxxx in the cloud shell, you might notice extra backspaces at the end of the serial logs output. This happens when the boot diagnostic is set to a managed storage account and the output isn't in UTF-8 encoding. Interestingly, this issue doesn't occur with a custom storage account.

Related command

az vm boot-diagnostics get-boot-log

Errors

login: vmadmin\r\nPassword: \r\n\r\n\r\nLogin incorrect\r\n\r\nSLES15 login: login: timed out after 60 seconds\r\r\n\r\n\r\nWelcome to SUSE Linux Enterprise Server 15 SP5 (x86_64) - Kernel 5.14.21-150500.33.60-azure (ttyS0).\r\n\r\neth0: 10.0.0.4 fe80::6245:bdff:fe6a:91c4\r\neth1: \r\n\r\nCurrent As Of: Mon Sep 9 11:33:11 2024\r\nNetwork Interfaces\r\n eth0: (Unconfigured)\r\n eth1: (Slave to eth0)\r\n\r\n\r\n\r\nSLES15 login: \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000

Issue script & Debug output

cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxx/resourceGroups/Linux/providers/Microsoft.Compute/virtualMachines/SLES15/retrieveBootDiagnosticsData?api-version=2024-07-01'
cli.azure.cli.core.sdk.policies: Request method: 'POST'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'xxxxxxxxxxxx'
cli.azure.cli.core.sdk.policies: 'CommandName': 'vm boot-diagnostics get-boot-log'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.64.0 (RPM) azsdk-python-core/1.28.0 Python/3.9.19 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/xxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/Linux/providers/Microsoft.Compute/virtualMachines/SLES15/retrieveBootDiagnosticsData?api-version=2024-07-01 HTTP/1.1" 200 593
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Length': '593'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-resource': 'Microsoft.Compute/LowCostGetSubscriptionMaximum;23998,Microsoft.Compute/LowCostGetResource;34'
cli.azure.cli.core.sdk.policies: 'x-ms-need-to-refresh-epl-cache': 'False'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '85da3c18-53f4-4717-ad70-3e507799bed0'
cli.azure.cli.core.sdk.policies: 'Server': 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '399'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-writes': '5999'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '881c6883-92d6-4427-91e7-4f811591a155'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTEUROPE:20240911T103612Z:881c6883-92d6-4427-91e7-4f811591a155'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'Date': 'Wed, 11 Sep 2024 10:36:11 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {
"consoleScreenshotBlobUri": "}
urllib3.connectionpool: Starting new HTTPS connection (1): cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7f1750dd1820>, <function _x509_from_base64_to_hex_transform at 0x7f1750dd18b0>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []

\nSLES15 login: vmadmin\r\nPassword: \r\n\r\n\r\nLogin incorrect\r\n\r\nSLES15 login: login: timed out after 60 seconds\r\r\n\r\n\r\nWelcome to SUSE Linux Enterprise Server 15 SP5 (x86_64) - Kernel 5.14.21-150500.33.60-azure (ttyS0).\r\n\r\neth0: 10.0.0.4 fe80::6245:bdff:fe6a:91c4\r\neth1: \r\n\r\nCurrent As Of: Mon Sep 9 11:33:11 2024\r\nNetwork Interfaces\r\n eth0: (Unconfigured)\r\n eth1: (Slave to eth0)\r\n\r\n\r\n\r\nSLES15 login: \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f1750e05a60>]
az_command_data_logger: exit code: 0
cli.main: Command ran in 5.911 seconds (init: 0.484, invoke: 5.426)
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 3899 in cache file under /home/ghaith/.azure/telemetry/20240911103613286
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.9 /usr/lib/az/lib/python3.9/site-packages/azure/cli/telemetry/init.py /home/ghaith/.azure /home/ghaith/.azure/telemetry/20240911103613286"
telemetry.process: Return from creating process 737
telemetry.main: Finish creating telemetry upload process.

Expected behavior

SLES15 login: xxxxxxxxx
Password:
Login incorrect
SLES15 login: login: timed out after 60 seconds
Welcome to SUSE Linux Enterprise Server 15 SP5 (x86_64) - Kernel 5.14.21-150500.33.60-azure (ttyS0).
eth0: xxxxxxxxxxxxxxxxxxxx
eth1:
Current As Of: Mon Sep 9 11:33:11 2024
Network Interfaces
eth0: (Unconfigured)
eth1: (Slave to eth0)

Environment Summary

Cloud shell - Bash
Azure CLI

az --version
azure-cli 2.64.0

core 2.64.0
telemetry 1.1.0

Extensions:
ai-examples 0.2.5
ml 2.29.0
ssh 2.0.5

Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1

Python location '/usr/bin/python3.9'
Extensions directory '/home/xxxxx/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'

Python (Linux) 3.9.19 (main, Aug 23 2024, 00:07:48)
[GCC 11.2.0]

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/snapshotSimilar-Issueact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions