Skip to content

Commit a85e519

Browse files
Added new Property DiffDiskPlacement for Ephemeral OS Disk. (#8847)
* Added diffDiskSettings property as part of Swagger changes needed for Ephemeral VM\VMSS * updated comment * updated swagger specs for diffdisksettings property * updated swagger spec comments for diff disk settings [property * added example to create Diff OS disk scaleset * updated 2018-10-01 version specs with diffdisk property * added example file for creating VM with diffdisksettings property * updated swagger changes for reimage operation in single vm * update examples * udpated examples * fixed validation errors * updated comments for reimage operation documentation * Updated examples and documentation for APIs in swagger * updated examples as per review comments * updated swagger documentation * updated swagger documentation with zone details in the sku example * updated swagger documentation and reverted the breaking changes * updated examples as per swagger model * updated swagger to remove the model validation errors for existing examples where we are passing read only parameter in the request * updated swagger * updated swagger * Added new property in DiffDiskSettings * updated swagger spec * udpated swagger * updated swagger spec * updated code * updated code * udpated swagger * updated code
1 parent 3a9aa50 commit a85e519

File tree

4 files changed

+627
-0
lines changed

4 files changed

+627
-0
lines changed

specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,6 +2679,12 @@
26792679
},
26802680
"Create a vm with DiskEncryptionSet resource id in the os disk and data disk.": {
26812681
"$ref": "./examples/CreateAVmWithDiskEncryptionSetResource.json"
2682+
},
2683+
"Create a vm with ephemeral os disk provisioning in Resource disk using placement property.": {
2684+
"$ref": "./examples/CreateAVmWithADiffOsDiskUsingDiffDiskPlacementAsResourceDisk.json"
2685+
},
2686+
"Create a vm with ephemeral os disk provisioning in Cache disk using placement property.": {
2687+
"$ref": "./examples/CreateAVmWithADiffOsDiskUsingDiffDiskPlacementAsCacheDisk.json"
26822688
}
26832689
}
26842690
},
@@ -3534,6 +3540,9 @@
35343540
},
35353541
"Create a scale set with DiskEncryptionSet resource in os disk and data disk.": {
35363542
"$ref": "./examples/CreateAScalesetWithDiskEncryptionSetResource.json"
3543+
},
3544+
"Create a scale set with ephemeral os disks using placement property.": {
3545+
"$ref": "./examples/CreateAScaleSetWithDiffOsDiskUsingDiffDiskPlacement.json"
35373546
}
35383547
}
35393548
},
@@ -7535,11 +7544,27 @@
75357544
"modelAsString": true
75367545
}
75377546
},
7547+
"DiffDiskPlacement": {
7548+
"type": "string",
7549+
"description": "Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. By default For more information on Ephemeral OS disk size requirements, please refer : https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements",
7550+
"enum": [
7551+
"CacheDisk",
7552+
"ResourceDisk"
7553+
],
7554+
"x-ms-enum": {
7555+
"name": "DiffDiskPlacement",
7556+
"modelAsString": true
7557+
}
7558+
},
75387559
"DiffDiskSettings": {
75397560
"properties": {
75407561
"option": {
75417562
"$ref": "#/definitions/DiffDiskOption",
75427563
"description": "Specifies the ephemeral disk settings for operating system disk."
7564+
},
7565+
"placement": {
7566+
"$ref": "#/definitions/DiffDiskPlacement",
7567+
"description": "Specifies the ephemeral disk placement for operating system disk. This property is used to specify Cache disk or Resource disk for ephemeral OS disk provisioning. By default if customer does not specify this placement property in the request, the Ephemeral OS disk will be provisioned using Cache disk."
75437568
}
75447569
},
75457570
"description": "Describes the parameters of ephemeral disk settings that can be specified for operating system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"vmScaleSetName": "{vmss-name}",
6+
"api-version": "2019-12-01",
7+
"parameters": {
8+
"sku": {
9+
"tier": "Standard",
10+
"capacity": 3,
11+
"name": "Standard_DS1_v2"
12+
},
13+
"properties": {
14+
"overprovision": true,
15+
"virtualMachineProfile": {
16+
"storageProfile": {
17+
"imageReference": {
18+
"sku": "windows2016",
19+
"publisher": "microsoft-ads",
20+
"version": "latest",
21+
"offer": "windows-data-science-vm"
22+
},
23+
"osDisk": {
24+
"caching": "ReadOnly",
25+
"diffDiskSettings": {
26+
"option": "Local",
27+
"placement": "ResourceDisk"
28+
},
29+
"managedDisk": {
30+
"storageAccountType": "Standard_LRS"
31+
},
32+
"createOption": "FromImage"
33+
}
34+
},
35+
"osProfile": {
36+
"computerNamePrefix": "{vmss-name}",
37+
"adminUsername": "{your-username}",
38+
"adminPassword": "{your-password}"
39+
},
40+
"networkProfile": {
41+
"networkInterfaceConfigurations": [
42+
{
43+
"name": "{vmss-name}",
44+
"properties": {
45+
"primary": true,
46+
"enableIPForwarding": true,
47+
"ipConfigurations": [
48+
{
49+
"name": "{vmss-name}",
50+
"properties": {
51+
"subnet": {
52+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
53+
}
54+
}
55+
}
56+
]
57+
}
58+
}
59+
]
60+
}
61+
},
62+
"upgradePolicy": {
63+
"mode": "Manual"
64+
}
65+
},
66+
"plan": {
67+
"publisher": "microsoft-ads",
68+
"product": "windows-data-science-vm",
69+
"name": "windows2016"
70+
},
71+
"location": "westus"
72+
}
73+
},
74+
"responses": {
75+
"200": {
76+
"body": {
77+
"sku": {
78+
"tier": "Standard",
79+
"capacity": 3,
80+
"name": "Standard_DS1_v2"
81+
},
82+
"name": "{vmss-name}",
83+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
84+
"plan": {
85+
"publisher": "microsoft-ads",
86+
"product": "standard-data-science-vm",
87+
"name": "standard-data-science-vm"
88+
},
89+
"type": "Microsoft.Compute/virtualMachineScaleSets",
90+
"properties": {
91+
"singlePlacementGroup": true,
92+
"overprovision": true,
93+
"uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
94+
"virtualMachineProfile": {
95+
"storageProfile": {
96+
"imageReference": {
97+
"sku": "standard-data-science-vm",
98+
"publisher": "microsoft-ads",
99+
"version": "latest",
100+
"offer": "standard-data-science-vm"
101+
},
102+
"osDisk": {
103+
"caching": "ReadOnly",
104+
"diffDiskSettings": {
105+
"option": "Local",
106+
"placement": "ResourceDisk"
107+
},
108+
"managedDisk": {
109+
"storageAccountType": "Standard_LRS"
110+
},
111+
"createOption": "FromImage"
112+
}
113+
},
114+
"osProfile": {
115+
"computerNamePrefix": "{vmss-name}",
116+
"adminUsername": "{your-username}",
117+
"secrets": [],
118+
"windowsConfiguration": {
119+
"provisionVMAgent": true,
120+
"enableAutomaticUpdates": true
121+
}
122+
},
123+
"networkProfile": {
124+
"networkInterfaceConfigurations": [
125+
{
126+
"name": "{vmss-name}",
127+
"properties": {
128+
"dnsSettings": {
129+
"dnsServers": []
130+
},
131+
"primary": true,
132+
"enableIPForwarding": true,
133+
"ipConfigurations": [
134+
{
135+
"name": "{vmss-name}",
136+
"properties": {
137+
"subnet": {
138+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
139+
},
140+
"privateIPAddressVersion": "IPv4"
141+
}
142+
}
143+
],
144+
"enableAcceleratedNetworking": false
145+
}
146+
}
147+
]
148+
}
149+
},
150+
"upgradePolicy": {
151+
"mode": "Manual"
152+
},
153+
"provisioningState": "Creating"
154+
},
155+
"location": "westus"
156+
}
157+
},
158+
"201": {
159+
"body": {
160+
"sku": {
161+
"tier": "Standard",
162+
"capacity": 3,
163+
"name": "Standard_DS1_v2"
164+
},
165+
"name": "{vmss-name}",
166+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
167+
"plan": {
168+
"publisher": "microsoft-ads",
169+
"product": "standard-data-science-vm",
170+
"name": "standard-data-science-vm"
171+
},
172+
"type": "Microsoft.Compute/virtualMachineScaleSets",
173+
"properties": {
174+
"singlePlacementGroup": true,
175+
"overprovision": true,
176+
"uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
177+
"virtualMachineProfile": {
178+
"storageProfile": {
179+
"imageReference": {
180+
"sku": "standard-data-science-vm",
181+
"publisher": "microsoft-ads",
182+
"version": "latest",
183+
"offer": "standard-data-science-vm"
184+
},
185+
"osDisk": {
186+
"caching": "ReadOnly",
187+
"diffDiskSettings": {
188+
"option": "Local",
189+
"placement": "ResourceDisk"
190+
},
191+
"managedDisk": {
192+
"storageAccountType": "Standard_LRS"
193+
},
194+
"createOption": "FromImage"
195+
}
196+
},
197+
"osProfile": {
198+
"computerNamePrefix": "{vmss-name}",
199+
"adminUsername": "{your-username}",
200+
"secrets": [],
201+
"windowsConfiguration": {
202+
"provisionVMAgent": true,
203+
"enableAutomaticUpdates": true
204+
}
205+
},
206+
"networkProfile": {
207+
"networkInterfaceConfigurations": [
208+
{
209+
"name": "{vmss-name}",
210+
"properties": {
211+
"dnsSettings": {
212+
"dnsServers": []
213+
},
214+
"primary": true,
215+
"enableIPForwarding": true,
216+
"ipConfigurations": [
217+
{
218+
"name": "{vmss-name}",
219+
"properties": {
220+
"subnet": {
221+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
222+
},
223+
"privateIPAddressVersion": "IPv4"
224+
}
225+
}
226+
],
227+
"enableAcceleratedNetworking": false
228+
}
229+
}
230+
]
231+
}
232+
},
233+
"upgradePolicy": {
234+
"mode": "Manual"
235+
},
236+
"provisioningState": "Creating"
237+
},
238+
"location": "westus"
239+
}
240+
}
241+
}
242+
}

0 commit comments

Comments
 (0)