I've been trying to create a Windows Server 2016 VM with an os disk that is less than the default of size 128GB using the azure cli. Below is a sample of what I've executed with simplified parameter names
az vm create --name 'dWeb02-vm' --resource-group 'dev-rg' --admin-password 'ComplexPassword' --admin-username 'dwebadm' --availability-set 'dev-as' --image 'Win2016Datacenter' --location 'northeurope' --nics 'dev-nic' --size 'Standard_B1ms' --os-disk-size-gb '32' --storage-sku 'StandardSSD_LRS'
This results in a VM being created with a managed disk but the size of the disk is 127GB and I get a Resize error on script execution
Deployment error
Deployment failed. Correlation ID: 0c0f1476-8464-444e-91e1-52de3631a64f. {
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "ResizeDiskError",
"message": "Resource with id THE RESOURCE ID."
}
]
}
}
Is it possible to create an OS disk that is less than 128GB for a windows VM?