Azure Virtual Machineで使用できるディスクはざっくりとPremium Disk(SSD)とStandard Disk(HDD)の2種類だったが、2018年6月からStandard SSDという選択肢が追加された。
https://azure.microsoft.com/ja-jp/blog/preview-standard-ssd-disks-for-azure-virtual-machine-workloads/
ネーミングはともかくとして、早速デプロイしてみようと思う。
なお、本ドキュメントでは性能検証などは特にしないのでご注意ください。
目次
- はじめに
- 空のディスクの作り方
- Standard SSDディスクを使ったVM用のテンプレート紹介
1. はじめに
まず、2018年6月25日時点ではータルはもちろん、PowerShellやAzureCLIで作ろうとすると「StandardSSDなんて作れないよ」って怒られる。
naoki@Azure:~$ az disk create -g sampleRG -n sampleDisk -z 30 -l northeurope --sku StandardSSD_LRS
az disk create: 'StandardSSD_LRS' is not an az disk create command. See 'az disk create --help'.
The most similar command to 'StandardSSD_LRS' is:
Standard_LRS
ではどうするか。テンプレートを使う。
2. 空のディスクの作り方
- すべてのサービス > テンプレート > 追加 > (全般に情報を記入) > テンプレートに後述する”サンプルテンプレート”の内容を入力 > 追加
- すべてのサービス > テンプレート > [作成したテンプレート] > 展開
テンプレートは適宜編集ください。また、作成できるリージョンは限られているのでご注意を。
サンプルテンプレート
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"disks_name": {
"defaultValue": "test-standardSSD",
"type": "String"
},
"disks_location": {
"defaultValue": "[resourceGroup().location]",
"type": "String"
},
"disks_sizeGB": {
"defaultValue": "50",
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Compute/disks",
"sku": {
"name": "StandardSSD_LRS",
"tier": "Standard"
},
"name": "[parameters('disks_name')]",
"apiVersion": "2018-04-01",
"location": "[parameters('disks_location')]",
"properties": {
"creationData": {
"createOption": "Empty"
},
"diskSizeGB": "[parameters('disks_sizeGB')]"
},
"dependsOn": []
}
]
}
なお、当手順でディスクを作成しても悲しいことにポータルではちゃんと表示ないよう。
ただ、少なくともAzure CLIでは情報が見られる。載せてないが、Azure PowerShellでもちゃんとStandardSSD_LRSと表示されていた。
naoki@Azure:~$ az disk show -g test-standardSSD-RG -n test-standardSSD -o json
{
"creationData": {
"createOption": "Empty",
"imageReference": null,
"sourceResourceId": null,
"sourceUri": null,
"storageAccountId": null
},
"diskSizeGb": 50,
"encryptionSettings": null,
"id": "/subscriptions/xxxxxxxxxxxxxxx/resourceGroups/test-standardSSD-RG/providers/Microsoft.Compute/disks/test-standardSSD",
"location": "northeurope",
"managedBy": null,
"name": "test-standardSSD",
"osType": null,
"provisioningState": "Succeeded",
"resourceGroup": "test-standardSSD-RG",
"sku": {
"name": "StandardSSD_LRS",
"tier": "Standard"
},
"tags": null,
"timeCreated": "2018-06-25T08:23:00.906154+00:00",
"type": "Microsoft.Compute/disks",
"zones": null
}
3. Standard SSDディスクを使ったVM用のテンプレート紹介
現時点ではWindowsのみだが、このテンプレートが利用できる。
https://github.com/Azure/azure-quickstart-templates/blob/master/101-vm-with-standardssd-disk/azuredeploy.json
下記のように、Standard SSDのOSディスクおよびデータディスクを持ったWindowsマシンがデプロイできる。
下記のように、ちゃんとStandard SSDで作られていることがわかる。
naoki@Azure:~$ az disk list -g Standard-SSD-RG
Name ResourceGroup Location Zones Sku SizeGb ProvisioningState OsType
------------------------ --------------- ----------- ------- --------------- -------- ------------------- --------
Standard-SSD-VMDataDisk0 Standard-SSD-RG northeurope StandardSSD_LRS 1024 Succeeded
Standard-SSD-VMDataDisk1 Standard-SSD-RG northeurope StandardSSD_LRS 1024 Succeeded
Standard-SSD-VMDataDisk2 Standard-SSD-RG northeurope StandardSSD_LRS 1024 Succeeded
Standard-SSD-VMDataDisk3 Standard-SSD-RG northeurope StandardSSD_LRS 1024 Succeeded
Standard-SSD-VMDataDisk4 Standard-SSD-RG northeurope StandardSSD_LRS 1024 Succeeded
standard-ssd-vmOSDisk Standard-SSD-RG northeurope StandardSSD_LRS 128 Succeeded Windows
Standard SSDは性能は気になるところ。時間を見つけて比較してみようかと思うが、興味ある方は是非!