Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
381 stars 1.2k forks source link

vm-repair: Invalid image "UbuntuLTS" #7828

Closed taoyama closed 1 month ago

taoyama commented 1 month ago

Describe the bug

az vm repair create command without --distro option result in below error.

ERROR: Invalid image "UbuntuLTS". Use a valid image URN, custom image name, custom image id, VHD blob URI, or pick an image from ['CentOS85Gen2', 'Debian11', 'FlatcarLinuxFreeGen2', 'OpenSuseLeap154Gen2', 'RHELRaw8LVMGen2', 'SuseSles15SP3', 'Ubuntu2204', 'Win2022Datacenter', 'Win2022AzureEditionCore', 'Win2019Datacenter', 'Win2016Datacenter', 'Win2012R2Datacenter', 'Win2012Datacenter'].
See vm create -h for more information on specifying an image.

Repair create failed. Cleaning up created resources.

it looks like urnAlias UbuntuLTS was removed.

az vm image list --query [].urnAlias
You are viewing an offline list of images, use --all to retrieve an up-to-date list
[
  "CentOS85Gen2",
  "Debian11",
  "FlatcarLinuxFreeGen2",
  "OpenSuseLeap154Gen2",
  "RHELRaw8LVMGen2",
  "SuseSles15SP3",
  "Ubuntu2204",
  "Win2022Datacenter",
  "Win2022AzureEditionCore",
  "Win2019Datacenter",
  "Win2016Datacenter",
  "Win2012R2Datacenter",
  "Win2012Datacenter"
]

Related command

az vm repair create

Errors

ERROR: Invalid image "UbuntuLTS". Use a valid image URN, custom image name, custom image id, VHD blob URI, or pick an image from ['CentOS85Gen2', 'Debian11', 'FlatcarLinuxFreeGen2', 'OpenSuseLeap154Gen2', 'RHELRaw8LVMGen2', 'SuseSles15SP3', 'Ubuntu2204', 'Win2022Datacenter', 'Win2022AzureEditionCore', 'Win2019Datacenter', 'Win2016Datacenter', 'Win2012R2Datacenter', 'Win2012Datacenter'].
See vm create -h for more information on specifying an image.

Repair create failed. Cleaning up created resources.

Issue script & Debug output

N/A

Expected behavior

image Ubuntu2204 should be used instead of deprecated image UbuntuLTS

Environment Summary

azure-cli                         2.62.0

core                              2.62.0
telemetry                          1.1.0

Extensions:
aem                                0.3.0
azure-devops                      0.26.0
interactive                        0.5.2
resource-graph                     2.1.0
serial-console                     0.1.6
ssh                                2.0.1
support                            1.0.3
vm-repair                          1.0.7

Dependencies:
msal                              1.28.1
azure-mgmt-resource               23.1.1

Python location '/usr/bin/python3.9'
Extensions directory '/home/toaoyama/.azure/cliextensions'

Python (Linux) 3.9.14 (main, Oct 12 2023, 19:48:32)
[GCC 11.2.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT, @ramankumarlive, @ushnaarshadkhan.

taoyama commented 1 month ago

it looks like the issue is already fixed in the latest version.