I'm using a VM scale set for Azure DevOps build agents, successfully. I have it configured for ephemeral OS disk, but it's hard to confirm that the instances are actually set up the way I expect.
Here's how the scale set is configured:
az vmss create `
--name test-scaleset `
--resource-group test-scaleset-rg `
--image /subscriptions/<mysub>/resourceGroups/<sharedimagegalleryresourcegroup>/providers/Microsoft.Compute/galleries/<sharedimagegallery>/images/devops-build/versions/latest `
--vm-sku Standard_D8s_v3 `
--ephemeral-os-disk true `
--os-disk-caching ReadOnly `
--instance-count 1 `
--disable-overprovision `
--upgrade-policy-mode manual `
--single-placement-group false `
--zones 1 2 3 `
--platform-fault-domain-count 1 `
--load-balancer '""' `
--authentication-type password `
--admin-username devops-admin `
--admin-password "somethingrandomenough" `
--storage-sku Standard_LRS `
--assign-identity [system] `
--scope /subscriptions/<mysub>/resourceGroups/test-scaleset-rg `
--vnet-name test-scaleset-vnet `
--subnet test-vms `
--no-wait
This creates a VM scale set, and I can see on the properties that it is configured for ephemeral OS disk:
When I look at the Disks panel for a created instance, I see this:
So, how do I interpret this? is the OS Disk ephemeral and running on a standard HDD? Or is Standard HDD just referring to the image source location?
The instance storage profile looks like this:
"storageProfile": {
"imageReference": {
"id": "/subscriptions/<mysub>/resourceGroups/<sharedimagegalleryresourcegroup>/providers/Microsoft.Compute/galleries/<sharedimagegallery>/images/devops-build/versions/latest",
"exactVersion": "1.0.4"
},
"osDisk": {
"osType": "Windows",
"diffDiskSettings": {
"option": "Local"
},
"name": "my-vmss-instance-OS__1_c560735c41c74691a53efaac977b6c66",
"createOption": "FromImage",
"caching": "ReadOnly",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/<mysub>/resourceGroups/<vmss-rg>/providers/Microsoft.Compute/disks/my-vmss-instance-OS__1_c560735c41c74691a53efaac977b6c66"
},
"diskSizeGB": 192
},
"dataDisks": []
}
I've tried to create the VMSS (as above), but specifying Premium_LRS as the storage account type, and the deployment fails with the message that Ephemeral OS disks require Standard_LRS. That last point is interesting because the VMSS has to use a VM SKU that supports Premium storage? Quite confusing.