I tried to create 2 virtual machines with the same parameters but with 2 different ways:
The Powershell cmdlet:
New-AzVm -ResourceGroupName $rg -Name "Testing1img" -Credential $credential -Image UbuntuLTS
Azure CLI from Powershell:
az vm create ` --name "Testing2img" ` --resource-group $rg ` --admin-username $credential.UserName ` --admin-password $credential.Password ` --image "UbuntuLTS"
Both create an Ubuntu LTS VM on the same resource group (different name). The problem I have is that they create VMs with slightly different settings.
In the first case it creates:
In the second case we have:
Why these (even small) differences? Shouldn't they both create the same exact VMs? Someone asking for an UbuntuLTS would expect the latest available image and not 16.04.