You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
az vm create --image is doing a poor job at validating and expressing need for --use-unmanaged-disk. If valid URI, it suppress the need for that flag, if invalid URI it suggests unmanaged disk is needed (where the real problem is invalid URI).
It seems az vm create --image shouldn't validate whether --use-unmanaged-disk is required. It seems to default to that if unknown/invalid URI. Somehow it knows a valid URI so perhaps there is a missing check here somewhere.
To Reproduce
az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:latest"
Confusing and misleading error message (tells me I want unmanaged disks... no i don't):
invalid usage for storage profile: create unmanaged OS disk created from generalized VHD:
missing: --os-type, --use-unmanaged-disk
Ok lets play along and try this: az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:latest" --use-unmanaged-disk --os-type "windows"
This error message tells me what the first command should of told me:
Deployment failed. Correlation ID: 3225ef51-8598-46fa-98c8-f6cfaa969b61. {
"error": {
"code": "InvalidParameter",
"target": "osDisk.image.uri",
"message": "The URI microsoftwindowsdesktop:Windows-10:latest does not look to be correct blob URI."
}
}
Lets identify the correct blob URI: az vm image list --offer Windows-10 --all --output table
Now that I know the cryptic SKU rs4-pro is what I am looking for I can now craft the appropriate spell: az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:rs4-pro:latest"
{created VM}
Expected behavior
az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:latest"
Informative error:
"message": "The URI microsoftwindowsdesktop:Windows-10:latest does not look to be correct blob URI."
Environment summary
Azure Shell - Bash.
Additional context
Why I am here today: Windows-10 SKU selection should not be so complex.
The default image SKUs include Ubuntu, UbuntuLTS, WindowsServer2012 etc.... why not Windows10?
Ultimately what I really am looking for today was an easy way to spin a standard Window10 VM, without having to lookup specific URIs or other nonsense: az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "Windows10"
The text was updated successfully, but these errors were encountered:
The image type detection and error can be improved for sure. We assumed users should just copy and paste the urn from the output of az vm image list, but looks like the urn could get manually edited.
Describe the bug
az vm create --image
is doing a poor job at validating and expressing need for--use-unmanaged-disk
. If valid URI, it suppress the need for that flag, if invalid URI it suggests unmanaged disk is needed (where the real problem is invalid URI).It seems
az vm create --image
shouldn't validate whether--use-unmanaged-disk
is required. It seems to default to that if unknown/invalid URI. Somehow it knows a valid URI so perhaps there is a missing check here somewhere.To Reproduce
az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:latest"
Confusing and misleading error message (tells me I want unmanaged disks... no i don't):
az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:latest" --use-unmanaged-disk --os-type "windows"
This error message tells me what the first command should of told me:
az vm image list --offer Windows-10 --all --output table
rs4-pro
is what I am looking for I can now craft the appropriate spell:az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:rs4-pro:latest"
Expected behavior
az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "MicrosoftWindowsDesktop:Windows-10:latest"
Informative error:
Environment summary
Azure Shell - Bash.
Additional context
Why I am here today: Windows-10 SKU selection should not be so complex.
The default image SKUs include Ubuntu, UbuntuLTS, WindowsServer2012 etc.... why not Windows10?
Ultimately what I really am looking for today was an easy way to spin a standard Window10 VM, without having to lookup specific URIs or other nonsense:
az vm create -n "blahblah" -g "blahrsg" --size "Standard_DS5_v2_Promo" --image "Windows10"
The text was updated successfully, but these errors were encountered: