az lab vm create ignores --admin-username option
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
`--admin-username` option is ignored when creating a Windows 2016 VM from a formula. If the formula specifies a default username, then the default is used. Otherwise, you get a cryptic error message.
**To Reproduce**
Without a default set:
```
$ az lab vm create -g $group --lab-name $lab --name my-vm --formula $formula --saved-secret VmPassword --admin-username MyUser
Deployment failed. Correlation ID: . A fatal error has occurred (reference Id ).
```
Using `--verbose` or `--debug` doesn't shed any light on why this command is failing. With a default username, the command works, but the specified name is ignored and the default one is used instead.
**Expected behavior**
`--admin-username` should set the admin username, overriding the formula default, if set.
**Environment summary**
homebrew azure-cli v2.0.51
P.S. I ran into four critical bugs in the `az lab vm` command (#7903 is another one that was already reported) in just a few hours of playing with DevTest Labs CLI for the first time. Does anyone actually test this stuff before it gets released?!?
Contributor guide
Assessment
This issue has not been assessed yet.