Azure / Azure/azure-cli

`--boot-diagnostics-storage` does not support managed boot diagnostics for `az vm create`

Open
#30,340 2 comments 0 reactions 2 assignees Claimed by @yanzhudd View on GitHub
act-observability-squad Azure CLI Team Compute question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

In order to provision a virtual machine with managed boot diagnostics enabled, [our documentation](https://learn.microsoft.com/en-us/azure/virtual-machines/boot-diagnostics#enable-managed-boot-diagnostics-using-cli) states that we must use the flag `--boot-diagnostics-storage` without any parameters passed to it. However, using `--boot-diagnostics-storage` without passing anything into it isn't allowed.

### Related command

`az vm create`

### Errors

argument --boot-diagnostics-storage: expected one argument

### Issue script & Debug output

cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.12/argparse.py", line 1931, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/argparse.py", line 2168, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/argparse.py", line 2089, in consume_optional
arg_count = match_argument(action, selected_patterns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/argparse.py", line 2264, in _match_argument
raise ArgumentError(action, msg)
argparse.ArgumentError: argument --boot-diagnostics-storage: expected one argument

cli.azure.cli.core.azclierror: argument --boot-diagnostics-storage: expected one argument

### Expected behavior

`az vm create ... --boot-diagnostics-storage` should create a virtual machine with managed boot diagnostics enabled

### Environment Summary

{
"azure-cli": "2.66.0",
"azure-cli-core": "2.66.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aks-preview": "7.0.0b3",
"amg": "1.3.6",
"azure-devops": "1.0.1",
"k8s-extension": "1.6.1"
}
}

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.