Azure / Azure/azure-cli

az lab vm create does not work with --subscription option

Open
#7,905 2 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad customer-reported Devtestlab question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
Running `az lab vm create --subscription ` always fails, while switching to that subscription via `az account set -s ` and then re-running the command works fine.

**To Reproduce**
```
$ az lab vm create --subscription $non_default_subscription -g $group --lab-name $lab --name my-vm --formula $formula --saved-secret VmPassword
Deployment failed. Correlation ID: . Artifacts from different Lab are not allowed. Use artifacts from the lab /subscriptions//resourceGroups//providers/Microsoft.DevTestLab/labs/, where the virtual machine is being created.
```

**Expected behavior**
The command should have the same behavior with `--subscription` as with `az account set`.

**Environment summary**
homebrew azure-cli v2.0.51

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.