You can read more about managed disks here.
Managed disks fixes all of these issues, and I just wanted to chat a little bit about ARM template changes required to make managed disks work.
Firstly, from an availability standpoint, managed disks can only be used with managed availability sets.
In order to set this, you need to point at one of the newer schema for compute. I've found that 2016-04-30-preview is the one to target. (Github). In examples on the internet, particularly from https://social.technet.microsoft.com/Forums/Azure/en-US/c07c2f1c-d70d-4182-a918-0309897e2163/arm-template-example-managed-disks?forum=windowsazuredata it mentioned that you needed to add a SKU parameter with the value of "Aligned". I've found this not to be true. Here is my version:
{You'll notice above that the "managed" property under properties seems to be what needs to be set. This is also detailed in the schema.
"comments": "Availability set for the cluster servers",
"type": "Microsoft.Compute/availabilitySets",
"apiVersion": "2016-04-30-preview",
"name": "[parameters('availabilitySetName')]",
"tags": {
"displayName": "Cluster AS"
},
"location": "[resourceGroup().location]",
"properties": {
"platformFaultDomainCount": "2",
"platformUpdateDomainCount": "5",
"managed": true
}
},
As managed disks now exist in a region and are either Standard or Premium, you do not need to specify a storage account or create one ahead of time. I've found different templates on the internet where sometimes the ID is specified and sometimes just the type of storage is specified. I've yet to play around with it enough to understand the differences in the approach.
Here is what I've done for OS disks.
"osDisk": {
"name": "[concat(parameters('serverNamePrefix'),'0',copyindex(1),'-OS')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"diskSizeGB": 64
},
And for data disks:
"dataDisks": [Remember that now, size matters, so try and keep those values in mind. We are currently in promo pricing at 50%, but we all know that won't last!
{
"lun": 0,
"name": "[concat(parameters('serverNamePrefix'),'0',copyindex(1),'-Disk1')]",
"createOption": "Empty",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"caching": "None",
"diskSizeGB": 32
}
],
Enjoy.
No comments:
Post a Comment