Forum Discussion

jameshao's avatar
jameshao
Copper Contributor
Oct 29, 2023

New-AzVmss: Can't find the image 'Win2019DataCenterGenSecond'

I'm testing out creating vmss with image which supports TrustedLaunch, in this case, the 2019-datacenter-gensecond. 

New-AzVmss -Credential $vmCred -ResourceGroupName $rgName -Name $vmssName -ImageName 'Win2019DataCenterGenSecond' -SecurityType TrustedLaunch 

 

New-AzVmss: Can't find the image 'Win2019DataCenterGenSecond'.

 

I tried with -ImageName '2019-datacenter-gensecond', it also says can't find the image. 

 

Is this because 'Win2019DataCenterGenSecond' is not the right image name or the subscription doesn't have the access to this image? 

 

How do I get all the UrnAlias names, especially for 2019-datacenter-gensecond? I can only see the UrnAlias for all the offline images through 'az vm image list --publisher MicrosoftWindowsServer --offer WindowsServer -o table' but the outputs doesn't have the entry for 2019-datacenter-gensecond. If I add --all to this command to list all the images including 2019-datacenter-gensecond, the outputs doesn't have the column of 'UrnAlias'. 

Resources