-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathdeployVms.json
96 lines (96 loc) · 2.95 KB
/
deployVms.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"adminUsername": {
"type": "string"
},
"adminPassword": {
"type": "securestring"
},
"vmNamePrefix": {
"type": "string"
},
"vmSize": {
"type": "string"
},
"availabilitySetName": {
"type": "string"
},
"vmCount": {
"type": "int"
},
"storageAccountNamePrefix": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines",
"name": "[concat(parameters('vmNamePrefix'),copyIndex(1))]",
"location": "[parameters('location')]",
"copy": {
"name": "addcCopy",
"count": "[parameters('vmCount')]"
},
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"availabilitySet": {
"id": "[resourceId('Microsoft.Compute/availabilitySets', parameters('availabilitySetName'))]"
},
"osProfile": {
"computerName": "[concat(parameters('vmNamePrefix'),copyIndex(1))]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2012-R2-Datacenter",
"version": "latest"
},
"osDisk": {
"name": "[concat(parameters('vmNamePrefix'),copyIndex(1),'-osdisk')]",
"vhd": {
"uri": "[concat('http://',parameters('storageAccountNamePrefix'),copyIndex(1),'.blob.core.windows.net/vhds/',parameters('vmNamePrefix'),copyIndex(1),'-osdisk.vhd')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"
},
"dataDisks": [
{
"name": "[concat(parameters('vmNamePrefix'),copyIndex(1),'-datadisk')]",
"vhd": {
"uri": "[concat('http://',parameters('storageAccountNamePrefix'),copyIndex(1),'.blob.core.windows.net/vhds/', parameters('vmNamePrefix'),copyIndex(1),'-datadisk.vhd')]"
},
"caching": "None",
"createOption": "empty",
"diskSizeGB": 127,
"lun": 0
}
]
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces',concat(parameters('vmNamePrefix'),copyIndex(1),'-nic'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": "true",
"storageUri": "[concat('http://',parameters('storageAccountNamePrefix'),'3.blob.core.windows.net')]"
}
}
}
}
]
}