From 5d375a9ecfbaa3b148313f9c4b6546c44e8fbbcd Mon Sep 17 00:00:00 2001 From: Raktima Das Date: Sat, 12 Jun 2021 13:56:37 -0700 Subject: [PATCH 1/4] For VmSizecustomization --- .../stable/2021-07-01/compute.json | 20 ++ .../CreateAVmWithVMSizeProperties.json | 184 ++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json index 24938083668c..ad97864f2487 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json @@ -3131,6 +3131,9 @@ }, "Create a VM with UserData": { "$ref": "./examples/CreateOrUpdateAVmWithUserData.json" + }, + "Create a VM with VM Size Properties": { + "$ref": "./examples/CreateOrUpdateAVmWithVMSizeProperties.json" } } }, @@ -9612,8 +9615,25 @@ } } }, + "vmSizeProperties": { + "$ref": "#/definitions/VMSizeProperties", + "description": "Specifies the VM Size Properties for customizing VM sizes." + }, "description": "Specifies the hardware settings for the virtual machine." }, + "VMSizeProperties": { + "properties": { + "vCPUsAvailable": { + "type": "integer", + "description": "Indicates the number of vCPUs available for the VM.

When this property is not specified in the request body, default behavior is to set it to the default number of vCPUs available for that VM size." + }, + "vCPUsPerCore": { + "type": "integer", + "description": "Indicates the vCPU to physical core ratio. Default value is set to the vCPUsPerCore available for the VM Size.

Setting this property to 1 also means that hyper-threading is disabled." + } + }, + "description": "Specifies VM Size Property settings on the virtual machine." + }, "ImageReference": { "properties": { "publisher": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json new file mode 100644 index 000000000000..001b5caadfc6 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2021-03-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "name": "myVMosdisk", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "adminPassword": "{your-password}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net", + "enabled": true + } + }, + "userData": "U29tZSBDdXN0b20gRGF0YQ==" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "dataDisks": [] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "storageUri": "http://nsgdiagnostic.blob.core.windows.net", + "enabled": true + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa", + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "dataDisks": [] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "storageUri": "http://nsgdiagnostic.blob.core.windows.net", + "enabled": true + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa", + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + } + } + } From 1757b7f69a5e14a67ec9b8efdb8c928280c4f3fb Mon Sep 17 00:00:00 2001 From: Raktima Das Date: Sat, 12 Jun 2021 13:56:37 -0700 Subject: [PATCH 2/4] For VmSizecustomization --- .../stable/2021-07-01/compute.json | 20 ++ .../CreateAVmWithVMSizeProperties.json | 184 ++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json index 24938083668c..ad97864f2487 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json @@ -3131,6 +3131,9 @@ }, "Create a VM with UserData": { "$ref": "./examples/CreateOrUpdateAVmWithUserData.json" + }, + "Create a VM with VM Size Properties": { + "$ref": "./examples/CreateOrUpdateAVmWithVMSizeProperties.json" } } }, @@ -9612,8 +9615,25 @@ } } }, + "vmSizeProperties": { + "$ref": "#/definitions/VMSizeProperties", + "description": "Specifies the VM Size Properties for customizing VM sizes." + }, "description": "Specifies the hardware settings for the virtual machine." }, + "VMSizeProperties": { + "properties": { + "vCPUsAvailable": { + "type": "integer", + "description": "Indicates the number of vCPUs available for the VM.

When this property is not specified in the request body, default behavior is to set it to the default number of vCPUs available for that VM size." + }, + "vCPUsPerCore": { + "type": "integer", + "description": "Indicates the vCPU to physical core ratio. Default value is set to the vCPUsPerCore available for the VM Size.

Setting this property to 1 also means that hyper-threading is disabled." + } + }, + "description": "Specifies VM Size Property settings on the virtual machine." + }, "ImageReference": { "properties": { "publisher": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json new file mode 100644 index 000000000000..883a24574106 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateAVmWithVMSizeProperties.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2021-03-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "name": "myVMosdisk", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "adminPassword": "{your-password}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net", + "enabled": true + } + }, + "userData": "U29tZSBDdXN0b20gRGF0YQ==" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "dataDisks": [] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "storageUri": "http://nsgdiagnostic.blob.core.windows.net", + "enabled": true + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa", + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "dataDisks": [] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "storageUri": "http://nsgdiagnostic.blob.core.windows.net", + "enabled": true + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa", + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + } + } +} From f7ac5b7ec3c7efe457c3578b0d498ac748eda02d Mon Sep 17 00:00:00 2001 From: Raktima Das Date: Tue, 29 Jun 2021 16:05:36 -0700 Subject: [PATCH 3/4] Moved example file to compute folder --- .../{ => compute}/CreateOrUpdateAVmWithVMSizeProperties.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/{ => compute}/CreateOrUpdateAVmWithVMSizeProperties.json (100%) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateOrUpdateAVmWithVMSizeProperties.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/compute/CreateOrUpdateAVmWithVMSizeProperties.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateOrUpdateAVmWithVMSizeProperties.json rename to specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/compute/CreateOrUpdateAVmWithVMSizeProperties.json From a3bcc6a0eff47979ed29bc0caf2591821ef860b1 Mon Sep 17 00:00:00 2001 From: Raktima Das Date: Tue, 29 Jun 2021 16:05:36 -0700 Subject: [PATCH 4/4] Moved example file to compute folder --- .../Microsoft.Compute/stable/2021-07-01/compute.json | 6 +++--- .../CreateOrUpdateAVmWithVMSizeProperties.json | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/{ => compute}/CreateOrUpdateAVmWithVMSizeProperties.json (100%) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json index 10013bab9800..46cff395a761 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json @@ -9616,7 +9616,7 @@ }, "vmSizeProperties": { "$ref": "#/definitions/VMSizeProperties", - "description": "Specifies the VM Size Properties for customizing VM sizes." + "description": "Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01." } }, "description": "Specifies the hardware settings for the virtual machine." @@ -9627,12 +9627,12 @@ "vCPUsAvailable": { "type": "integer", "format": "int32", - "description": "Indicates the number of vCPUs available for the VM.

When this property is not specified in the request body, default behavior is to set it to the default number of vCPUs available for that VM size." + "description": "Specifies the number of vCPUs available for the VM.

When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) ." }, "vCPUsPerCore": { "type": "integer", "format": "int32", - "description": "Indicates the vCPU to physical core ratio. Default value is set to the vCPUsPerCore available for the VM Size.

Setting this property to 1 also means that hyper-threading is disabled." + "description": "Specifies the vCPU to physical core ratio.

When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)

Setting this property to 1 also means that hyper-threading is disabled." } }, "description": "Specifies VM Size Property settings on the virtual machine." diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateOrUpdateAVmWithVMSizeProperties.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/compute/CreateOrUpdateAVmWithVMSizeProperties.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/CreateOrUpdateAVmWithVMSizeProperties.json rename to specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/examples/compute/CreateOrUpdateAVmWithVMSizeProperties.json