From cb39de62c1bac51455eaf7ad3fbe8ac9ec84df58 Mon Sep 17 00:00:00 2001 From: soshekar Date: Wed, 11 Jul 2018 23:38:00 -0700 Subject: [PATCH 1/6] Add missing ScaleSet properties The change adds the following missing properties 1) "zones" property to VirtualMachineScaleSetVM 2) DiskSizeInGB to VirtualMachineScaleSetOSDisk 3) DiskSizeInGB to VirtualMachineScaleSetUpdateOSDisk --- .../stable/2018-04-01/compute.json | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json index 7a263e84ef2f..77794266641b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json @@ -6294,6 +6294,11 @@ "$ref": "#/definitions/CreateOption", "description": "Specifies how the virtual machines in the scale set should be created.

The only allowed value is: **FromImage** \\u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described." }, + "diskSizeGB": { + "type": "integer", + "format": "int32", + "description": "Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB" + }, "osType": { "type": "string", "description": "This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux**", @@ -6337,6 +6342,11 @@ "type": "boolean", "description": "Specifies whether writeAccelerator should be enabled or disabled on the disk." }, + "diskSizeGB": { + "type": "integer", + "format": "int32", + "description": "Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB" + }, "image": { "$ref": "#/definitions/VirtualHardDisk", "description": "The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist." @@ -6381,7 +6391,7 @@ "diskSizeGB": { "type": "integer", "format": "int32", - "description": "Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB" + "description": "Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB" }, "managedDisk": { "description": "The managed disk parameters.", @@ -7535,6 +7545,14 @@ "$ref": "#/definitions/VirtualMachineExtension" }, "description": "The virtual machine child extension resources." + }, + "zones": { + "readOnly": true, + "type": "array", + "items": { + "type": "string" + }, + "description": "The virtual machine zones." } }, "allOf": [ From 4b9a3db76a6d96c18c6c3e65b3e4008e33aafe11 Mon Sep 17 00:00:00 2001 From: soshekar Date: Thu, 12 Jul 2018 12:55:21 -0700 Subject: [PATCH 2/6] New example to create a scaleset with zones --- ...reateAScaleSetWithVMsInDifferentZones.json | 284 ++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json new file mode 100644 index 000000000000..ffbdd5dbcd41 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json @@ -0,0 +1,284 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmScaleSetName": "{vmss-name}", + "api-version": "2018-04-01", + "parameters": { + "sku": { + "tier": "Standard", + "capacity": 2, + "name": "Standard_A1_v2" + }, + "location": "centralus", + "properties": { + "overprovision": true, + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "FromImage", + "diskSizeGB": 512 + }, + "dataDisks": [ + { + "diskSizeGB": 1023, + "createOption": "Empty", + "lun": 0 + }, + { + "diskSizeGB": 1023, + "createOption": "Empty", + "lun": 1 + } + ] + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "adminPassword": "{your-password}" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ] + } + } + ] + } + }, + "upgradePolicy": { + "mode": "Automatic" + } + }, + "zones": [ + "1", + "3" + ], + } + }, + "responses": { + "200": { + "body": { + "sku": { + "tier": "Standard", + "capacity": 2, + "name": "Standard_A1_v2" + }, + "name": "{vmss-name}", + "properties": { + "singlePlacementGroup": false, + "overprovision": true, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "zoneBalance": false, + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "FromImage", + "diskSizeGB": 512 + }, + "dataDisks": [ + { + "caching": "None", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "Empty", + "lun": 0, + "diskSizeGB": 1023 + }, + { + "caching": "None", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "Empty", + "lun": 1, + "diskSizeGB": 1023 + } + ] + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "secrets": [], + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + }, + "privateIPAddressVersion": "IPv4" + } + } + ], + "enableAcceleratedNetworking": false + } + } + ] + } + }, + "upgradePolicy": { + "mode": "Automatic" + }, + "provisioningState": "Succeeded" + }, + "zones": [ + "1", + "3" + ], + "location": "centralus", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" + } + }, + "201": { + "body": { + "sku": { + "tier": "Standard", + "capacity": 2, + "name": "Standard_A1_v2" + }, + "name": "{vmss-name}", + "properties": { + "singlePlacementGroup": false, + "overprovision": true, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "zoneBalance": false, + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "FromImage", + "diskSizeGB": 512 + }, + "dataDisks": [ + { + "caching": "None", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "Empty", + "lun": 0, + "diskSizeGB": 1023 + }, + { + "caching": "None", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "Empty", + "lun": 1, + "diskSizeGB": 1023 + } + ] + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "secrets": [], + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + }, + "privateIPAddressVersion": "IPv4" + } + } + ], + "enableAcceleratedNetworking": false + } + } + ] + } + }, + "upgradePolicy": { + "mode": "Automatic" + }, + "provisioningState": "Creating" + }, + "zones": [ + "1", + "3" + ], + "location": "centralus", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" + } + } + } +} From ce2190244cf21218c47c293074f9d1ae3b53cf7d Mon Sep 17 00:00:00 2001 From: soshekar Date: Thu, 12 Jul 2018 13:08:20 -0700 Subject: [PATCH 3/6] Add DiskSizeInGB to VMScaleSet OSDisk in example --- .../CreateAScaleSetWithEmptyDataDisksOnEachVm.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithEmptyDataDisksOnEachVm.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithEmptyDataDisksOnEachVm.json index 4584aae7954a..acb1f2d4c9fe 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithEmptyDataDisksOnEachVm.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithEmptyDataDisksOnEachVm.json @@ -26,7 +26,8 @@ "managedDisk": { "storageAccountType": "Standard_LRS" }, - "createOption": "FromImage" + "createOption": "FromImage", + "diskSizeGB": 512 }, "dataDisks": [ { @@ -100,7 +101,8 @@ "managedDisk": { "storageAccountType": "Standard_LRS" }, - "createOption": "FromImage" + "createOption": "FromImage", + "diskSizeGB": 512 }, "dataDisks": [ { @@ -162,7 +164,7 @@ "upgradePolicy": { "mode": "Manual" }, - "provisioningState": "Creating" + "provisioningState": "Succeeded" }, "location": "westus", "type": "Microsoft.Compute/virtualMachineScaleSets", @@ -194,7 +196,8 @@ "managedDisk": { "storageAccountType": "Standard_LRS" }, - "createOption": "FromImage" + "createOption": "FromImage", + "diskSizeGB": 512 }, "dataDisks": [ { From 4e98b84c7568476f40e3f71bbd26be4c1108786d Mon Sep 17 00:00:00 2001 From: soshekar Date: Thu, 12 Jul 2018 15:34:07 -0700 Subject: [PATCH 4/6] Add reference to CreateAScaleSetWithVMsInDifferentZones.json in swagger --- .../Microsoft.Compute/stable/2018-04-01/compute.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json index 77794266641b..827a023e4edf 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/compute.json @@ -2219,7 +2219,10 @@ }, "Create a custom-image scale set from an unmanaged generalized os image.": { "$ref": "./examples/CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json" - } + }, + "Create a scale set with virtual machines in different zones.": { + "$ref": "./examples/CreateAScaleSetWithVMsInDifferentZones.json" + } } }, "patch": { From 0e1e61989df1557ac8c812b4d224e8f372bfe851 Mon Sep 17 00:00:00 2001 From: soshekar Date: Thu, 12 Jul 2018 16:14:36 -0700 Subject: [PATCH 5/6] Remove tabs --- ...reateAScaleSetWithVMsInDifferentZones.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json index ffbdd5dbcd41..f8029503f51a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json @@ -27,7 +27,7 @@ "storageAccountType": "Standard_LRS" }, "createOption": "FromImage", - "diskSizeGB": 512 + "diskSizeGB": 512 }, "dataDisks": [ { @@ -76,7 +76,7 @@ "zones": [ "1", "3" - ], + ], } }, "responses": { @@ -92,7 +92,7 @@ "singlePlacementGroup": false, "overprovision": true, "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", - "zoneBalance": false, + "zoneBalance": false, "virtualMachineProfile": { "storageProfile": { "imageReference": { @@ -107,7 +107,7 @@ "storageAccountType": "Standard_LRS" }, "createOption": "FromImage", - "diskSizeGB": 512 + "diskSizeGB": 512 }, "dataDisks": [ { @@ -171,10 +171,10 @@ }, "provisioningState": "Succeeded" }, - "zones": [ - "1", - "3" - ], + "zones": [ + "1", + "3" + ], "location": "centralus", "type": "Microsoft.Compute/virtualMachineScaleSets", "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" @@ -192,7 +192,7 @@ "singlePlacementGroup": false, "overprovision": true, "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", - "zoneBalance": false, + "zoneBalance": false, "virtualMachineProfile": { "storageProfile": { "imageReference": { @@ -207,7 +207,7 @@ "storageAccountType": "Standard_LRS" }, "createOption": "FromImage", - "diskSizeGB": 512 + "diskSizeGB": 512 }, "dataDisks": [ { @@ -271,10 +271,10 @@ }, "provisioningState": "Creating" }, - "zones": [ - "1", - "3" - ], + "zones": [ + "1", + "3" + ], "location": "centralus", "type": "Microsoft.Compute/virtualMachineScaleSets", "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" From d9802c4115d2762976dc4b70406ffc2c74cb3615 Mon Sep 17 00:00:00 2001 From: soshekar Date: Thu, 12 Jul 2018 19:31:03 -0700 Subject: [PATCH 6/6] Fix json formatting --- .../CreateAScaleSetWithVMsInDifferentZones.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json index f8029503f51a..b3e37129623e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2018-04-01/examples/CreateAScaleSetWithVMsInDifferentZones.json @@ -73,10 +73,10 @@ "mode": "Automatic" } }, - "zones": [ - "1", - "3" - ], + "zones": [ + "1", + "3" + ] } }, "responses": { @@ -172,8 +172,8 @@ "provisioningState": "Succeeded" }, "zones": [ - "1", - "3" + "1", + "3" ], "location": "centralus", "type": "Microsoft.Compute/virtualMachineScaleSets", @@ -272,8 +272,8 @@ "provisioningState": "Creating" }, "zones": [ - "1", - "3" + "1", + "3" ], "location": "centralus", "type": "Microsoft.Compute/virtualMachineScaleSets",