az vm boot-diagnostics get-boot-log fails
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
Getting the following error when trying to retrieve the boot logs using azure-cli:
(Note: I am using azure-cli v2.16.0 from the Cloud Shell)
```
johan@Azure:~$ az vm boot-diagnostics get-boot-log -g r610d2 -n r610d2
CLIInternalError: The command failed with an unexpected error. Here is the traceback:
'utf-8' codec can't decode byte 0xff in position 15790: invalid start byte
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 717, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 710, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 784, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/vm/custom.py", line 1515, in get_boot_log
storage_client.get_blob_to_stream(container, blob, BootLogStreamWriter(sys.stdout), max_connections=1)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py", line 2166, in get_blob_to_stream
stream.write(blob.content)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/vm/custom.py", line 1446, in write
content = str_or_bytes.decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 15790: invalid start byte
```
Contributor guide
Assessment
This issue has not been assessed yet.