Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding VMSizeProperties for VmSizecustomization #14785

Merged
merged 20 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5d375a9
For VmSizecustomization
raktdas Jun 12, 2021
1757b7f
For VmSizecustomization
raktdas Jun 12, 2021
91a870f
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 13, 2021
a447057
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 13, 2021
ff7cc0c
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 13, 2021
3752858
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 13, 2021
6a3820c
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 14, 2021
632709e
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 14, 2021
35b465c
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 14, 2021
c201dd5
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 14, 2021
6192120
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 19, 2021
e507650
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 19, 2021
0c3212a
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jun 24, 2021
963f1fe
Merge branch 'feature/cplat-2021-07-01' of https://github.com/Azure/a…
raktdas Jun 29, 2021
f7ac5b7
Moved example file to compute folder
raktdas Jun 29, 2021
a3bcc6a
Moved example file to compute folder
raktdas Jun 29, 2021
7ebee8b
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jul 11, 2021
af73f2b
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jul 11, 2021
44ce6a3
Merge branch 'feature/cplat-2021-07-01' of https://github.com/raktdas…
raktdas Jul 14, 2021
c05934f
Merge branch 'feature/cplat-2021-07-01' into feature/cplat-2021-07-01
raktdas Jul 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3132,6 +3132,9 @@
"Create a VM with UserData": {
"$ref": "./examples/compute/CreateOrUpdateAVmWithUserData.json"
},
"Create a VM with VM Size Properties": {
"$ref": "./examples/compute/CreateOrUpdateAVmWithVMSizeProperties.json"
},
"Create or update a VM with capacity reservation": {
"$ref": "./examples/compute/CreateOrUpdateAVmWithCapacityReservation.json"
}
Expand Down Expand Up @@ -10529,10 +10532,30 @@
"name": "VirtualMachineSizeTypes",
"modelAsString": true
}
},
"vmSizeProperties": {
"$ref": "#/definitions/VMSizeProperties",
"description": "Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. <br><br> This feature is still in preview mode and is not supported for VirtualMachineScaleSet. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details."
}
},
"description": "Specifies the hardware settings for the virtual machine."
},
"VMSizeProperties": {
"type": "object",
"properties": {
"vCPUsAvailable": {
"type": "integer",
"format": "int32",
raktdas marked this conversation as resolved.
Show resolved Hide resolved
"description": "Specifies the number of vCPUs available for the VM. <br><br> 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": "Specifies the vCPU to physical core ratio. <br><br> 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) <br><br> 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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {
raktdas marked this conversation as resolved.
Show resolved Hide resolved
"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": "Updating"
},
"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"
}
}
}
}