Skip to content

Commit

Permalink
Added vm size properties for vm scale set (#16723)
Browse files Browse the repository at this point in the history
* Added vm size properties

* Added get examples

* Added example for vm size properties

* Added example for vm size properties

Co-authored-by: Theodore Chang <thchan@microsoft.com>
  • Loading branch information
raktdas and grizzlytheodore committed Jan 3, 2022
1 parent cedd64f commit 59a6f77
Show file tree
Hide file tree
Showing 4 changed files with 542 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3629,6 +3629,9 @@
},
"Get a virtual machine placed on a dedicated host group through automatic placement": {
"$ref": "./examples/compute/GetVirtualMachineAutoPlacedOnDedicatedHostGroup.json"
},
"Get a virtual machine with VM Size Properties": {
"$ref": "./examples/compute/GetVirtualMachineWithVMSizeProperties.json"
}
}
}
Expand Down Expand Up @@ -5864,6 +5867,9 @@
"Create a scale set with spot restore policy": {
"$ref": "./examples/compute/CreateAScaleSetWithSpotRestorePolicy.json"
},
"Create a scale set with vm size properties": {
"$ref": "./examples/compute/CreateOrUpdateAScaleSetWithVMSizeProperties.json"
},
"Create a scale set with SecurityType as ConfidentialVM": {
"$ref": "./examples/compute/CreateAScaleSetWithSecurityTypeConfidentialVM.json"
}
Expand Down Expand Up @@ -8218,6 +8224,9 @@
"x-ms-examples": {
"Get VM scale set VM with UserData": {
"$ref": "./examples/compute/GetVirtualMachineScaleSetVMWithUserData.json"
},
"Get VM scale set VM with VMSizeProperties": {
"$ref": "./examples/compute/GetVirtualMachineScaleSetVMWithVMSizeProperties.json"
}
}
}
Expand Down Expand Up @@ -11797,6 +11806,16 @@
},
"description": "Contains the list of gallery applications that should be made available to the VM/VMSS"
},
"VirtualMachineScaleSetHardwareProfile": {
"type": "object",
"properties": {
"vmSizeProperties": {
"$ref": "#/definitions/VMSizeProperties",
"description": "Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. <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 scale set."
},
"AdditionalCapabilities": {
"properties": {
"ultraSSDEnabled": {
Expand Down Expand Up @@ -14267,6 +14286,10 @@
"applicationProfile": {
"$ref": "#/definitions/ApplicationProfile",
"description": "Specifies the gallery applications that should be made available to the VM/VMSS"
},
"hardwareProfile": {
"$ref": "#/definitions/VirtualMachineScaleSetHardwareProfile",
"description": "Specifies the hardware profile related details of a scale set. <br><br>Minimum api-version: 2021-11-01."
}
},
"description": "Describes a virtual machine scale set virtual machine profile."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmScaleSetName": "{vmss-name}",
"api-version": "2021-11-01",
"parameters": {
"sku": {
"tier": "Standard",
"capacity": 3,
"name": "Standard_D1_v2"
},
"location": "westus",
"properties": {
"overprovision": true,
"upgradePolicy": {
"mode": "Manual"
},
"virtualMachineProfile": {
"storageProfile": {
"imageReference": {
"sku": "2016-Datacenter",
"publisher": "MicrosoftWindowsServer",
"version": "latest",
"offer": "WindowsServer"
},
"osDisk": {
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"createOption": "FromImage"
}
},
"userData": "RXhhbXBsZSBVc2VyRGF0YQ==",
"hardwareProfile": {
"vmSizeProperties": {
"vCPUsAvailable": 1,
"vCPUsPerCore": 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}"
}
}
}
]
}
}
]
}
}
}
}
},
"responses": {
"200": {
"body": {
"sku": {
"tier": "Standard",
"capacity": 3,
"name": "Standard_D1_v2"
},
"name": "{vmss-name}",
"properties": {
"singlePlacementGroup": true,
"overprovision": true,
"uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
"virtualMachineProfile": {
"storageProfile": {
"imageReference": {
"sku": "2016-Datacenter",
"publisher": "MicrosoftWindowsServer",
"version": "latest",
"offer": "WindowsServer"
},
"osDisk": {
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"createOption": "FromImage"
}
},
"hardwareProfile": {
"vmSizeProperties": {
"vCPUsAvailable": 1,
"vCPUsPerCore": 1
}
},
"diagnosticsProfile": {
"bootDiagnostics": {
"storageUri": "http://nsgdiagnostic.blob.core.windows.net",
"enabled": true
}
},
"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": "Manual"
},
"provisioningState": "Creating"
},
"location": "westus",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
},
"201": {
"body": {
"sku": {
"tier": "Standard",
"capacity": 3,
"name": "Standard_D1_v2"
},
"name": "{vmss-name}",
"properties": {
"singlePlacementGroup": true,
"overprovision": true,
"uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
"virtualMachineProfile": {
"storageProfile": {
"imageReference": {
"sku": "2016-Datacenter",
"publisher": "MicrosoftWindowsServer",
"version": "latest",
"offer": "WindowsServer"
},
"osDisk": {
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS"
},
"createOption": "FromImage"
}
},
"hardwareProfile": {
"vmSizeProperties": {
"vCPUsAvailable": 1,
"vCPUsPerCore": 1
}
},
"diagnosticsProfile": {
"bootDiagnostics": {
"storageUri": "http://nsgdiagnostic.blob.core.windows.net",
"enabled": true
}
},
"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": "Manual"
},
"provisioningState": "Creating"
},
"location": "westus",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
}
}
}
Loading

0 comments on commit 59a6f77

Please sign in to comment.