Describe the bug
When attempting to create a custom image in Azure DevTest Labs using the Azure CLI, the following error is returned:
ERROR: InvalidArgumentValue: --source-vm-id: Invalid format: resource id should be in '/subscriptions/{}/resourcegroups/{}/providers/microsoft.devtestlab/labs/{}/virtualmachines/{}' format.
This occurs despite the --source-vm-id being provided in the expected format, as shown in the command below. The command does not execute successfully and fails due to an apparent validation issue with the provided source-vm-id format.
Related command
az lab custom-image create
Errors
ERROR: InvalidArgumentValue: --source-vm-id: Invalid format: resource id should be in '/subscriptions/{}/resourcegroups/{}/providers/microsoft.devtestlab/labs/{}/virtualmachines/{}' format.
Issue script & Debug output
$ az lab custom-image create --lab-name myLab \
> --name image-1 \
> --os-state NonDeprovisioned \
> --os-type Linux \
> --resource-group myRg \
> --source-vm-id /subscriptions/<real_subscription_id_here>/resourcegroups/myRg/providers/microsoft.devtestlab/labs/MyLab/virtualmachines/tmp-1730362420
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
ERROR: InvalidArgumentValue: --source-vm-id: Invalid format: resource id should be in '/subscriptions/{}/resourcegroups/{}/providers/microsoft.devtestlab/labs/{}/virtualmachines/{}' format.
Expected behavior
I'm expecting that the custom image is created in the DevTestLab.
Environment Summary
$ az version
{
"azure-cli": "2.65.0",
"azure-cli-core": "2.65.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"account": "0.2.5"
}
}
Additional context
No response
Describe the bug
When attempting to create a custom image in Azure DevTest Labs using the Azure CLI, the following error is returned:
This occurs despite the
--source-vm-idbeing provided in the expected format, as shown in the command below. The command does not execute successfully and fails due to an apparent validation issue with the provided source-vm-id format.Related command
az lab custom-image create
Errors
ERROR: InvalidArgumentValue: --source-vm-id: Invalid format: resource id should be in '/subscriptions/{}/resourcegroups/{}/providers/microsoft.devtestlab/labs/{}/virtualmachines/{}' format.
Issue script & Debug output
Expected behavior
I'm expecting that the custom image is created in the DevTestLab.
Environment Summary
Additional context
No response