From 4df3455a74add1374c3859187b1e73ef75be494b Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:26:57 -0800 Subject: [PATCH 01/21] Basic structure for update --- .../instance-mix-create.md | 4 +- .../instance-mix-update.md | 75 +++++++++++++++++++ 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 articles/virtual-machine-scale-sets/instance-mix-update.md diff --git a/articles/virtual-machine-scale-sets/instance-mix-create.md b/articles/virtual-machine-scale-sets/instance-mix-create.md index 2080a8fb8e..e2e6f36f10 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-create.md +++ b/articles/virtual-machine-scale-sets/instance-mix-create.md @@ -5,7 +5,7 @@ author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual ms.service: azure-virtual-machine-scale-sets -ms.date: 11/18/2024 +ms.date: 1/7/2025 ms.reviewer: jushiman --- @@ -64,7 +64,7 @@ az vmss create \ --skuprofile-allocation-strategy CapacityOptimized ``` -#### [Azure PowerShell](#tab/powershell-1) +### [Azure PowerShell](#tab/powershell-1) You can use the following basic command to create a scale set using Instance Mix using the following command, which will default to using the `lowestPrice` allocation strategy: ```azurepowershell-interactive diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md new file mode 100644 index 0000000000..505ca9dfa4 --- /dev/null +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -0,0 +1,75 @@ +--- +title: Create a Virtual Machine Scale Set with Instance Mix +description: How to create a virtual machine scale set using Instance Mix on different platforms. +author: brittanyrowe +ms.author: brittanyrowe +ms.topic: conceptual +ms.service: azure-virtual-machine-scale-sets +ms.date: 1/7/2025 +ms.reviewer: jushiman +--- + +# Update Instance Mix settings on an existing scale set +The article walks through how to update the Instance Mix settings on a scale set. + +> [!IMPORTANT] +> Instance Mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). + +## Prerequisites +Before using Instance Mix, complete feature registration for the `FlexVMScaleSetSkuProfileEnabled` feature flag using the [az feature register](/cli/azure/feature#az-feature-register) command: + +```azurecli-interactive +az feature register --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfileEnabled" +``` + +It takes a few moments for the feature to register. Verify the registration status by using the [az feature show](/cli/azure/feature#az-feature-register) command: + +```azurecli-interactive +az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfileEnabled" +``` + +## Update the Instance Mix settings on an existing scale set + + +### [Azure portal](#tab/portal-1) +### [Azure CLI](#tab/cli-1) + + +```azurecli-interactive + +``` + +### [Azure PowerShell](#tab/powershell-1) +You can use the following basic command to create a scale set using Instance Mix using the following command, which will default to using the `lowestPrice` allocation strategy: + +```azurepowershell-interactive + +``` + +### [REST API](#tab/arm-1) +To deploy an Instance Mix scale set through REST API, use a `PUT` call to and include the following sections in your request body: +```json + +``` + +--- + +## Update an existing scale set to use Instance Mix +Existing scale sets that do not have Instance Mix can enable Instance Mix by specifying the `skuProfile` properties in the scale set. This can be specified through REST, CLI, and PowerShell. The following sections have sample code snippets to demonstrate enabling Instance Mix on existing scale sets. + +### [Azure portal](#tab/portal-2) +### [Azure CLI](#tab/cli-2) +```azurecli-interactive + +``` +### [Azure PowerShell](#tab/powershell-2) +```azurepowershell-interactive +``` + +### [REST API](#tab/arm-2) +```json +``` + + +## Next steps +Learn how to [troubleshoot](instance-mix-faq-troubleshooting.md) your Instance Mix enabled scale set. \ No newline at end of file From 75fe09fa6dc8efc3fce21bdf44dadc3a83cc2a61 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:47:41 -0800 Subject: [PATCH 02/21] update allocation strategy CLI --- articles/virtual-machine-scale-sets/instance-mix-update.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 505ca9dfa4..bbcfb87df8 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -33,10 +33,13 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ### [Azure portal](#tab/portal-1) ### [Azure CLI](#tab/cli-1) +To change the `allocationStrategy` run the following CLI command: - ```azurecli-interactive - +az vmss update \ + --resource-group {resourceGroupName} + --name {scaleSetName} + -- set sku.allocationStrategy=CapacityOptimized ``` ### [Azure PowerShell](#tab/powershell-1) From df717b0a55370ce9ad2ce0d67702603ce22bbd50 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:35:16 -0800 Subject: [PATCH 03/21] powershell update allocation strategy --- .../instance-mix-update.md | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index bbcfb87df8..edacc8cfda 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -33,20 +33,36 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ### [Azure portal](#tab/portal-1) ### [Azure CLI](#tab/cli-1) -To change the `allocationStrategy` run the following CLI command: +You can use the following basic command to update the allocation strategy. In this case, we're updating the scale set to use the `CapacityOptimized` allocation strategy: ```azurecli-interactive az vmss update \ --resource-group {resourceGroupName} --name {scaleSetName} - -- set sku.allocationStrategy=CapacityOptimized + --set skuProfile.allocationStrategy=CapacityOptimized ``` ### [Azure PowerShell](#tab/powershell-1) -You can use the following basic command to create a scale set using Instance Mix using the following command, which will default to using the `lowestPrice` allocation strategy: +You can use the following basic command to update the allocation strategy: ```azurepowershell-interactive - +# Set variable values +$resourceGroupName = "resourceGroupName" +$vmssName = "scaleSetName" +$allocationStrategy = "CapacityOptimized"; + +# Get the scale set information +$vmss = Get-AzVmss ` +-ResourceGroupName $resourceGroupName ` +-VMScaleSetName $vmssName; + +# Update the allocation strategy +$vmss.Sku.AllocationStrategy = $allocationStrategy + +#Update the scale set +Update-AzVmss ` +-ResourceGroupName $resourceGroupName ` +-VMScaleSetName $vmssName ` ``` ### [REST API](#tab/arm-1) From 2661dc2202142e8ec1bffa0de12aa82da688ea59 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:55:47 -0800 Subject: [PATCH 04/21] more structure --- .../instance-mix-update.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index edacc8cfda..d43b54bbd0 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -33,6 +33,8 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ### [Azure portal](#tab/portal-1) ### [Azure CLI](#tab/cli-1) + +#### Change the Allocation Strategy You can use the following basic command to update the allocation strategy. In this case, we're updating the scale set to use the `CapacityOptimized` allocation strategy: ```azurecli-interactive @@ -41,8 +43,12 @@ az vmss update \ --name {scaleSetName} --set skuProfile.allocationStrategy=CapacityOptimized ``` - +#### Change the VM Sizes +You can use the following command to update the VM sizes specified in the `skuProfile` + ### [Azure PowerShell](#tab/powershell-1) + +#### Change the Allocation Strategy You can use the following basic command to update the allocation strategy: ```azurepowershell-interactive @@ -64,13 +70,17 @@ Update-AzVmss ` -ResourceGroupName $resourceGroupName ` -VMScaleSetName $vmssName ` ``` +#### Change the VM Sizes ### [REST API](#tab/arm-1) +#### Change the Allocation Strategy To deploy an Instance Mix scale set through REST API, use a `PUT` call to and include the following sections in your request body: ```json ``` +#### Change the VM Sizes + --- ## Update an existing scale set to use Instance Mix From cc52fd6661f39f0006015ddc4b2220e89d932723 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:12:10 -0800 Subject: [PATCH 05/21] small update to rest create --- articles/virtual-machine-scale-sets/instance-mix-create.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-create.md b/articles/virtual-machine-scale-sets/instance-mix-create.md index e2e6f36f10..48c4418f7e 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-create.md +++ b/articles/virtual-machine-scale-sets/instance-mix-create.md @@ -101,7 +101,7 @@ $vmssResult = New-AzVmss -ResourceGroupName $resourceGroupName -Name $vmssName - ``` ### [REST API](#tab/arm-1) -To deploy an Instance Mix scale set through REST API, use a `PUT` call to and include the following sections in your request body: +To deploy an Instance Mix scale set through REST API, use a `PUT` call to the scale set: ```json PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 ``` From 5b09aa84ab2deaeab42741b21e083af006442315 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:14:42 -0800 Subject: [PATCH 06/21] Update REST, added structure for body content --- .../instance-mix-update.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index d43b54bbd0..829dbec1fd 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -30,8 +30,6 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ## Update the Instance Mix settings on an existing scale set - -### [Azure portal](#tab/portal-1) ### [Azure CLI](#tab/cli-1) #### Change the Allocation Strategy @@ -73,13 +71,24 @@ Update-AzVmss ` #### Change the VM Sizes ### [REST API](#tab/arm-1) +To update the Instance Mix settings through REST API, use a `PATCH` call to the VMSS resource. Be sure to use an API version on or after `2023-09-01`: +```json +PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 +``` + +The following subsections will walk through what to use if you want to change the allocation strategy or VM sizes through REST APIs. + #### Change the Allocation Strategy -To deploy an Instance Mix scale set through REST API, use a `PUT` call to and include the following sections in your request body: +Be sure to include the properties you'd like to change in the request body. In this example, we're changing the allocation strategy: ```json ``` #### Change the VM Sizes +In this example, we're changing the VM sizes specified in the scale set: +```json + +``` --- From 0ed6b9c3ea6711ed3c52e60d0f27da7f8ce02d33 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:30:46 -0800 Subject: [PATCH 07/21] Update VM sizes CLI and structure for PS --- .../instance-mix-update.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 829dbec1fd..e1038b6c47 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -37,12 +37,19 @@ You can use the following basic command to update the allocation strategy. In th ```azurecli-interactive az vmss update \ - --resource-group {resourceGroupName} - --name {scaleSetName} + --resource-group {resourceGroupName} \ + --name {scaleSetName} \ --set skuProfile.allocationStrategy=CapacityOptimized ``` #### Change the VM Sizes -You can use the following command to update the VM sizes specified in the `skuProfile` +You can use the following command to update the VM sizes specified in the `skuProfile`. In this scenario, we are updating the VM sizes to be Standard D2asv4, Standard D2asv5, and Standard D2sv5: + +```azurecli-interactive +az vmss update \ + --resource-group {resourceGroupName} \ + --name {scaleSetName} \ + --skuprofile-vmsizes Standard_D2as_v4 Standard_D2as_v5 Standard_D2s_v5 +``` ### [Azure PowerShell](#tab/powershell-1) @@ -69,6 +76,11 @@ Update-AzVmss ` -VMScaleSetName $vmssName ` ``` #### Change the VM Sizes +To change the VM sizes specified in your scale set, you can use the following PowerShell command. In this example, we'll be updating th escale set to use Standard D2asv4, Standard D2asv5, and Standard D2sv5. + +```azurepowershell-interactive + +``` ### [REST API](#tab/arm-1) To update the Instance Mix settings through REST API, use a `PATCH` call to the VMSS resource. Be sure to use an API version on or after `2023-09-01`: From 883e0131bd195322d0e4a9fe1ae8a06a43198694 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:33:54 -0800 Subject: [PATCH 08/21] CLI version disclaimer --- articles/virtual-machine-scale-sets/instance-mix-create.md | 2 ++ articles/virtual-machine-scale-sets/instance-mix-update.md | 1 + 2 files changed, 3 insertions(+) diff --git a/articles/virtual-machine-scale-sets/instance-mix-create.md b/articles/virtual-machine-scale-sets/instance-mix-create.md index 48c4418f7e..cd1a88419c 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-create.md +++ b/articles/virtual-machine-scale-sets/instance-mix-create.md @@ -42,6 +42,8 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile 10. You can specify other properties in subsequent tabs, or you can go to **Review + create** and select the **Create** button at the bottom of the page to start your Instance Mix scale set deployment. ### [Azure CLI](#tab/cli-1) +Before using CLI commands with Instance Mix, please be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. + You can use the following basic command to create a scale set using Instance Mix using the following command, which will default to using the `lowestPrice` allocation strategy: ```azurecli-interactive diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index e1038b6c47..2429521080 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -31,6 +31,7 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ## Update the Instance Mix settings on an existing scale set ### [Azure CLI](#tab/cli-1) +Before using CLI commands with Instance Mix, please be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. #### Change the Allocation Strategy You can use the following basic command to update the allocation strategy. In this case, we're updating the scale set to use the `CapacityOptimized` allocation strategy: From 0d6b08841a8bf34b76722e5c20f21543dc1c4d83 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:13:59 -0800 Subject: [PATCH 09/21] PS Change Sizes --- .../instance-mix-update.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 2429521080..cab9aee934 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -69,18 +69,43 @@ $vmss = Get-AzVmss ` -VMScaleSetName $vmssName; # Update the allocation strategy -$vmss.Sku.AllocationStrategy = $allocationStrategy +$vmss.SkuProfile.AllocationStrategy = $allocationStrategy #Update the scale set Update-AzVmss ` -ResourceGroupName $resourceGroupName ` -VMScaleSetName $vmssName ` +-VirtualMachineScaleSet $vmss ``` #### Change the VM Sizes To change the VM sizes specified in your scale set, you can use the following PowerShell command. In this example, we'll be updating th escale set to use Standard D2asv4, Standard D2asv5, and Standard D2sv5. ```azurepowershell-interactive +# Set variable values +$resourceGroupName = "resourceGroupName" +$vmssName = "scaleSetName" + +# Create a variable to hold the new VM Sizes values +$vmSizeList = [System.Collections.Generic.List[Microsoft.Azure.Management.Compute.Models.SkuProfileVMSize]]::new() + +# Add the VM sizes to the list +$vmSizeList.Add("Standard_D2as_v5") +$vmSizeList.Add("Standard_D2s_v5") +$vmSizeList.Add("Standard_D2as_v4") + +# Get the scale set information +$vmss = Get-AzVmss ` +-ResourceGroupName $resourceGroupName ` +-VMScaleSetName $vmssName +# Update the VM sizes in the scale set +$vmss.SkuProfile.vmSizes = $vmSizeList + +#Update the scale set +Update-AzVmss ` +-ResourceGroupName $resourceGroupName ` +-VMScaleSetName $vmssName ` +-VirtualMachineScaleSet $vmss ``` ### [REST API](#tab/arm-1) From d8bb563ec689bf243dff0c58f893f560b68fb82c Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:18:56 -0800 Subject: [PATCH 10/21] Metadata + more content about updating settings --- articles/virtual-machine-scale-sets/instance-mix-update.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index cab9aee934..e597c31d24 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -1,6 +1,6 @@ --- title: Create a Virtual Machine Scale Set with Instance Mix -description: How to create a virtual machine scale set using Instance Mix on different platforms. +description: How to update a virtual machine scale set Instance Mix settings. author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual @@ -29,6 +29,11 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ``` ## Update the Instance Mix settings on an existing scale set +The Instance Mix settings can be updated on your scale set via CLI, PowerShell, and REST API. You can change either the VM sizes or the allocation strategy, or both, in a single call. + +When changing allocation strategies, the *new* allocation strategy won't become effecitve until the scale set scales in or out. That is to say, your existing VMs will not be altered based on the allocation strategy until there is a scaling action. + +When changing from `Prioritized` to another allocation strategy, you must first nullify the priority ranks associated with the VM sizes. This will be covered in more detail in the code snippets below. ### [Azure CLI](#tab/cli-1) Before using CLI commands with Instance Mix, please be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. From 95250643a184b7befd59d3369191b5e7d455b1a2 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:13:29 -0800 Subject: [PATCH 11/21] Update skuprofile REST --- .../instance-mix-update.md | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index e597c31d24..0e9ec6bb92 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -122,17 +122,45 @@ PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGrou The following subsections will walk through what to use if you want to change the allocation strategy or VM sizes through REST APIs. #### Change the Allocation Strategy -Be sure to include the properties you'd like to change in the request body. In this example, we're changing the allocation strategy: +Be sure to include the properties you'd like to change in the request body. In this example, we're changing the allocation strategy to `capactiyOptimized`: ```json - +{ + "properties": { + "skuProfile": { + "allocationStrategy": "capacityOptimized" + } + } +} ``` #### Change the VM Sizes In this example, we're changing the VM sizes specified in the scale set: ```json +{ + "properties": { + "skuProfile": { + "vmSizes": [ + { + "name": "Standard_D2as_v4" + }, + { + "name": "Standard_D2as_v5" + }, + { + "name": "Standard_D2s_v4" + }, + { + "name": "Standard_D2s_v3" + }, + { + "name": "Standard_D2s_v5" + } + ] + } + } +} ``` - --- ## Update an existing scale set to use Instance Mix From 8c58d578c1cfb0fab91101645f215762e13f73c6 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:48:26 -0800 Subject: [PATCH 12/21] REST snippets --- .../instance-mix-update.md | 78 ++++++++++++++++--- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 0e9ec6bb92..6edc419b2f 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -82,6 +82,7 @@ Update-AzVmss ` -VMScaleSetName $vmssName ` -VirtualMachineScaleSet $vmss ``` + #### Change the VM Sizes To change the VM sizes specified in your scale set, you can use the following PowerShell command. In this example, we'll be updating th escale set to use Standard D2asv4, Standard D2asv5, and Standard D2sv5. @@ -122,19 +123,36 @@ PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGrou The following subsections will walk through what to use if you want to change the allocation strategy or VM sizes through REST APIs. #### Change the Allocation Strategy -Be sure to include the properties you'd like to change in the request body. In this example, we're changing the allocation strategy to `capactiyOptimized`: +You must specify both the VM sizes you'd like to use, as well as the allocation strategy. In this example, we're changing the allocation strategy to `capactiyOptimized`: ```json { "properties": { "skuProfile": { - "allocationStrategy": "capacityOptimized" + "vmSizes": [ + { + "name": "Standard_D2as_v4" + }, + { + "name": "Standard_D2as_v5" + }, + { + "name": "Standard_D2s_v4" + }, + { + "name": "Standard_D2s_v3" + }, + { + "name": "Standard_D2s_v5" + } + ], + "allocationStrategy": "capacityOptimized" } } } ``` #### Change the VM Sizes -In this example, we're changing the VM sizes specified in the scale set: +To change the VM Sizes in your deployment, you only need to change the VM Sizes in the `skuProfile`.In this example, we're changing the VM sizes specified in the scale set to use D2sv5, D2asv5, D2sv4, D2asv4, and D2sv3: ```json { "properties": { @@ -159,24 +177,64 @@ In this example, we're changing the VM sizes specified in the scale set: } } } - ``` --- ## Update an existing scale set to use Instance Mix -Existing scale sets that do not have Instance Mix can enable Instance Mix by specifying the `skuProfile` properties in the scale set. This can be specified through REST, CLI, and PowerShell. The following sections have sample code snippets to demonstrate enabling Instance Mix on existing scale sets. +Existing scale sets that do not have Instance Mix can enable Instance Mix by specifying the `skuProfile` properties in the scale set. This can be specified through REST API and CLI. + +The properties that must be updated are: +1. `sku.name` must be set to `"Mix"`. +2. `sku.tier` must be set to `null`. +3. You must define the `skuProfile` properties. At least one value must be provided in `vmSizes`. An `allocationStrategy` should be set, but if a value isn't provided, Azure defaults to `lowestPrice`. + +The following sections have sample code snippets to demonstrate enabling Instance Mix on existing scale sets. -### [Azure portal](#tab/portal-2) ### [Azure CLI](#tab/cli-2) -```azurecli-interactive +In this snippet, we'll be updating an existing scale set using Flexible Orchestration Mode to use Instance Mix with the VM sizes D2asv4, D2sv5, and D2asv5 and allocation strategy of `capacityOptimized`. -``` -### [Azure PowerShell](#tab/powershell-2) -```azurepowershell-interactive +```azurecli-interactive +az vmss update \ +--name {scaleSetName} \ +--resource-group {resourceGroupName} \ +--set sku.name=Mix sku.tier=null \ +--skuprofile-vmsizes Standard_D2as_v4 Standard_D2s_v5 Standard_D2as_v5 \ +--sku-allocat-strat capacityOptimized ``` ### [REST API](#tab/arm-2) +To update the Instance Mix settings through REST API, use a `PATCH` call to the VMSS resource. Be sure to use an API version on or after `2023-09-01`. ```json +PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 +``` + +In the body, be sure to set `sku.name` to `"Mix"` and include the `skuProfile` with your inputs for `vmSizes` and `allocationStrategy`: +```json +{ + "sku": { + "name": "Mix" + }, + "properties": { + "skuProfile": { + "vmSizes": [ + { + "name": "Standard_D2as_v4" + }, + { + "name": "Standard_D2as_v5" + }, + { + "name": "Standard_D2s_v4" + }, + { + "name": "Standard_D2s_v5" + } + ], + "allocationStrategy": "lowestPrice" + }, + } +} + ``` From 076fd49b3dda215b0c792a45948e74ea0ed2c6b4 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:49:08 -0800 Subject: [PATCH 13/21] Remove Autoscale support --- articles/virtual-machine-scale-sets/instance-mix-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-overview.md b/articles/virtual-machine-scale-sets/instance-mix-overview.md index 3a7af118f3..ed99ff8402 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-overview.md +++ b/articles/virtual-machine-scale-sets/instance-mix-overview.md @@ -18,7 +18,7 @@ Instance Mix enables you to specify multiple different Virtual Machine (VM) size Instance Mix is best suited for workloads that are flexible in compute requirements and can be run on various different sized VMs. Using Instance Mix you can: - Deploy a heterogeneous mix of VM sizes in a single scale set. You can view max scale set instance counts in the [documentation](./virtual-machine-scale-sets-orchestration-modes.md#what-has-changed-with-flexible-orchestration-mode). - Optimize your deployments for cost or capacity through allocation strategies. -- Continue to make use of scale set features, like [Spot Priority Mix](./spot-priority-mix.md), [Autoscale](./virtual-machine-scale-sets-autoscale-overview.md), or [Upgrade Policies](./virtual-machine-scale-sets-set-upgrade-policy.md). +- Continue to make use of scale set features, like [Spot Priority Mix](./spot-priority-mix.md) or [Upgrade Policies](./virtual-machine-scale-sets-set-upgrade-policy.md). - Spread a heterogeneous mix of VMs across Availability Zones and Fault Domains for high availability and reliability. ## Changes to existing scale set properties From d0f1a4839808d4a650146ccff7de5654d9b67482 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:51:21 -0800 Subject: [PATCH 14/21] Updated limitations --- .../virtual-machine-scale-sets/instance-mix-overview.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-overview.md b/articles/virtual-machine-scale-sets/instance-mix-overview.md index ed99ff8402..48dfda1bdb 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-overview.md +++ b/articles/virtual-machine-scale-sets/instance-mix-overview.md @@ -55,14 +55,10 @@ This allocation strategy allows you to specify a priority ranking to the VM size ## Cost Following the scale set cost model, usage of Instance Mix is free. You continue to only pay for the underlying resources, like the VM, disk, and networking. -## Limitations -- Instance Mix is currently available in the following regions: West US, West US2, East US, and East US2. +## Limitations - Instance Mix is only available for scale sets using Flexible Orchestration Mode. - You must have quota for the VM sizes you're requesting with Instance Mix. -- You can specify **up to** five VM sizes with Instance Mix at this time. -- The `Prioritized` allocation strategy is currently only supported via REST and Azure portal deployments. -- Existing scale sets can't be updated to use Instance Mix. -- VM sizes can't be changed once the scale set is deployed. +- You can specify **up to** five VM sizes with Instance Mix. - For REST API deployments, you must have an existing virtual network inside of the resource group that you're deploying your scale set with Instance Mix in. ## Next steps From 5e6926d20027a60516e36ca2dafe9d8c9b7a2735 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:52:03 -0800 Subject: [PATCH 15/21] Metadata updates --- articles/virtual-machine-scale-sets/instance-mix-create.md | 2 +- articles/virtual-machine-scale-sets/instance-mix-overview.md | 2 +- articles/virtual-machine-scale-sets/instance-mix-update.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-create.md b/articles/virtual-machine-scale-sets/instance-mix-create.md index cd1a88419c..62387d9f8a 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-create.md +++ b/articles/virtual-machine-scale-sets/instance-mix-create.md @@ -5,7 +5,7 @@ author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual ms.service: azure-virtual-machine-scale-sets -ms.date: 1/7/2025 +ms.date: 1/10/2025 ms.reviewer: jushiman --- diff --git a/articles/virtual-machine-scale-sets/instance-mix-overview.md b/articles/virtual-machine-scale-sets/instance-mix-overview.md index 48dfda1bdb..24059a4ce6 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-overview.md +++ b/articles/virtual-machine-scale-sets/instance-mix-overview.md @@ -5,7 +5,7 @@ author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual ms.service: azure-virtual-machine-scale-sets -ms.date: 11/18/2024 +ms.date: 1/10/2025 ms.reviewer: jushiman --- diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 6edc419b2f..df4c90ed5a 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -5,7 +5,7 @@ author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual ms.service: azure-virtual-machine-scale-sets -ms.date: 1/7/2025 +ms.date: 1/10/2025 ms.reviewer: jushiman --- From 1d074f490754bfd16efde55acacde1482a1b11cd Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:54:15 -0800 Subject: [PATCH 16/21] Spacing --- articles/virtual-machine-scale-sets/instance-mix-update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index df4c90ed5a..a1f09d9e91 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -227,7 +227,7 @@ In the body, be sure to set `sku.name` to `"Mix"` and include the `skuProfile` w "name": "Standard_D2s_v4" }, { - "name": "Standard_D2s_v5" + "name": "Standard_D2s_v5" } ], "allocationStrategy": "lowestPrice" From 3eca8c81bd2f482080591d1c8d468093b820ed48 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:09:21 -0800 Subject: [PATCH 17/21] Acrolinx --- .../instance-mix-create.md | 2 +- .../instance-mix-update.md | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-create.md b/articles/virtual-machine-scale-sets/instance-mix-create.md index 62387d9f8a..8c100c652d 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-create.md +++ b/articles/virtual-machine-scale-sets/instance-mix-create.md @@ -160,4 +160,4 @@ When using the `prioritized` allocation strategy, you can specify the priority r --- ## Next steps -Learn how to [troubleshoot](instance-mix-faq-troubleshooting.md) your Instance Mix enabled scale set. \ No newline at end of file +Learn how to [update](instance-mix-update.md) your Instance Mix enabled scale set. \ No newline at end of file diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index a1f09d9e91..9ee903b6e1 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -13,7 +13,7 @@ ms.reviewer: jushiman The article walks through how to update the Instance Mix settings on a scale set. > [!IMPORTANT] -> Instance Mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). +> Instance Mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change before general availability (GA). ## Prerequisites Before using Instance Mix, complete feature registration for the `FlexVMScaleSetSkuProfileEnabled` feature flag using the [az feature register](/cli/azure/feature#az-feature-register) command: @@ -29,14 +29,14 @@ az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfile ``` ## Update the Instance Mix settings on an existing scale set -The Instance Mix settings can be updated on your scale set via CLI, PowerShell, and REST API. You can change either the VM sizes or the allocation strategy, or both, in a single call. +The Instance Mix settings can be updated on your scale set via CLI, PowerShell, and REST API. You can change either the virtual machine (VM) sizes or the allocation strategy, or both, in a single call. -When changing allocation strategies, the *new* allocation strategy won't become effecitve until the scale set scales in or out. That is to say, your existing VMs will not be altered based on the allocation strategy until there is a scaling action. +When changing allocation strategies, the *new* allocation strategy won't become effective until the scale set scales in or out. That is to say, your existing VMs won't be altered based on the allocation strategy until there's a scaling action. -When changing from `Prioritized` to another allocation strategy, you must first nullify the priority ranks associated with the VM sizes. This will be covered in more detail in the code snippets below. +When changing from `Prioritized` to another allocation strategy, you must first nullify the priority ranks associated with the VM sizes. This will be covered in more detail in the supporting code snippets. ### [Azure CLI](#tab/cli-1) -Before using CLI commands with Instance Mix, please be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. +Before using CLI commands with Instance Mix, be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. #### Change the Allocation Strategy You can use the following basic command to update the allocation strategy. In this case, we're updating the scale set to use the `CapacityOptimized` allocation strategy: @@ -48,7 +48,7 @@ az vmss update \ --set skuProfile.allocationStrategy=CapacityOptimized ``` #### Change the VM Sizes -You can use the following command to update the VM sizes specified in the `skuProfile`. In this scenario, we are updating the VM sizes to be Standard D2asv4, Standard D2asv5, and Standard D2sv5: +You can use the following command to update the VM sizes specified in the `skuProfile`. In this scenario, we're updating the VM sizes to be Standard D2asv4, Standard D2asv5, and Standard D2sv5: ```azurecli-interactive az vmss update \ @@ -84,20 +84,20 @@ Update-AzVmss ` ``` #### Change the VM Sizes -To change the VM sizes specified in your scale set, you can use the following PowerShell command. In this example, we'll be updating th escale set to use Standard D2asv4, Standard D2asv5, and Standard D2sv5. +To change the VM sizes specified in your scale set, you can use the following PowerShell command. In this example, we'll be updating the scale set to use Standard D2asv4, Standard D2asv5, and Standard D2sv5. ```azurepowershell-interactive # Set variable values -$resourceGroupName = "resourceGroupName" -$vmssName = "scaleSetName" +$resourceGroupName = "resourceGroupName" ` +$vmssName = "scaleSetName"; # Create a variable to hold the new VM Sizes values $vmSizeList = [System.Collections.Generic.List[Microsoft.Azure.Management.Compute.Models.SkuProfileVMSize]]::new() # Add the VM sizes to the list -$vmSizeList.Add("Standard_D2as_v5") -$vmSizeList.Add("Standard_D2s_v5") -$vmSizeList.Add("Standard_D2as_v4") +$vmSizeList.Add("Standard_D2as_v5") ` +$vmSizeList.Add("Standard_D2s_v5") ` +$vmSizeList.Add("Standard_D2as_v4") ; # Get the scale set information $vmss = Get-AzVmss ` @@ -115,15 +115,15 @@ Update-AzVmss ` ``` ### [REST API](#tab/arm-1) -To update the Instance Mix settings through REST API, use a `PATCH` call to the VMSS resource. Be sure to use an API version on or after `2023-09-01`: +To update the Instance Mix settings through REST API, use a `PATCH` call to the scale set resource. Be sure to use an API version on or after `2023-09-01`: ```json PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 ``` -The following subsections will walk through what to use if you want to change the allocation strategy or VM sizes through REST APIs. +The following subsections walk through what to use if you want to change the allocation strategy or VM sizes through REST APIs. #### Change the Allocation Strategy -You must specify both the VM sizes you'd like to use, as well as the allocation strategy. In this example, we're changing the allocation strategy to `capactiyOptimized`: +You must specify both the VM sizes you'd like to use, and the allocation strategy. In this example, we're changing the allocation strategy to `capactiyOptimized`: ```json { "properties": { @@ -152,7 +152,7 @@ You must specify both the VM sizes you'd like to use, as well as the allocation ``` #### Change the VM Sizes -To change the VM Sizes in your deployment, you only need to change the VM Sizes in the `skuProfile`.In this example, we're changing the VM sizes specified in the scale set to use D2sv5, D2asv5, D2sv4, D2asv4, and D2sv3: +To change the VM Sizes in your deployment, you only need to change the VM Sizes in the `skuProfile`. In this example, we're changing the VM sizes specified in the scale set to use D2sv5, D2asv5, D2sv4, D2asv4, and D2sv3: ```json { "properties": { @@ -181,7 +181,7 @@ To change the VM Sizes in your deployment, you only need to change the VM Sizes --- ## Update an existing scale set to use Instance Mix -Existing scale sets that do not have Instance Mix can enable Instance Mix by specifying the `skuProfile` properties in the scale set. This can be specified through REST API and CLI. +Existing scale sets that don't have Instance Mix can enable Instance Mix by specifying the `skuProfile` properties in the scale set. The `skuProfile`, `vmSizes`, and `allocationStrategy` can be specified through REST API and CLI. The properties that must be updated are: 1. `sku.name` must be set to `"Mix"`. @@ -191,7 +191,7 @@ The properties that must be updated are: The following sections have sample code snippets to demonstrate enabling Instance Mix on existing scale sets. ### [Azure CLI](#tab/cli-2) -In this snippet, we'll be updating an existing scale set using Flexible Orchestration Mode to use Instance Mix with the VM sizes D2asv4, D2sv5, and D2asv5 and allocation strategy of `capacityOptimized`. +In this snippet, we'll update an existing scale set using Flexible Orchestration Mode to use Instance Mix with the VM sizes D2asv4, D2sv5, and D2asv5 and allocation strategy of `capacityOptimized`. ```azurecli-interactive az vmss update \ @@ -203,7 +203,7 @@ az vmss update \ ``` ### [REST API](#tab/arm-2) -To update the Instance Mix settings through REST API, use a `PATCH` call to the VMSS resource. Be sure to use an API version on or after `2023-09-01`. +To update the Instance Mix settings through REST API, use a `PATCH` call to the scale set resource. Be sure to use an API version on or after `2023-09-01`. ```json PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 ``` From 908e4298d392d315f166208df2d26d42650b816e Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:11:54 -0800 Subject: [PATCH 18/21] Acrolinx 2 --- articles/virtual-machine-scale-sets/instance-mix-update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 9ee903b6e1..74165a4fbd 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -1,5 +1,5 @@ --- -title: Create a Virtual Machine Scale Set with Instance Mix +title: Update a Virtual Machine Scale Set with Instance Mix description: How to update a virtual machine scale set Instance Mix settings. author: brittanyrowe ms.author: brittanyrowe From c62f17dcdb93fcd2911f0aaf85de1c405c658c45 Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:17:33 -0800 Subject: [PATCH 19/21] Acrolinx 3 --- .../instance-mix-create.md | 30 ++++++++-------- .../instance-mix-overview.md | 34 +++++++++---------- .../instance-mix-update.md | 32 ++++++++--------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/articles/virtual-machine-scale-sets/instance-mix-create.md b/articles/virtual-machine-scale-sets/instance-mix-create.md index 8c100c652d..e4d8fac396 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-create.md +++ b/articles/virtual-machine-scale-sets/instance-mix-create.md @@ -1,6 +1,6 @@ --- -title: Create a Virtual Machine Scale Set with Instance Mix -description: How to create a virtual machine scale set using Instance Mix on different platforms. +title: Create a Virtual Machine Scale Set with instance mix +description: How to create a virtual machine scale set using instance mix on different platforms. author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual @@ -9,14 +9,14 @@ ms.date: 1/10/2025 ms.reviewer: jushiman --- -# Deploy a scale set using Instance Mix -The article walks through how to deploy a scale set using Instance Mix. +# Deploy a scale set using instance mix +The article walks through how to deploy a scale set using instance mix. > [!IMPORTANT] -> Instance Mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). +> Instance mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). ## Prerequisites -Before using Instance Mix, complete feature registration for the `FlexVMScaleSetSkuProfileEnabled` feature flag using the [az feature register](/cli/azure/feature#az-feature-register) command: +Before using instance mix, complete feature registration for the `FlexVMScaleSetSkuProfileEnabled` feature flag using the [az feature register](/cli/azure/feature#az-feature-register) command: ```azurecli-interactive az feature register --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfileEnabled" @@ -28,23 +28,23 @@ It takes a few moments for the feature to register. Verify the registration stat az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfileEnabled" ``` -## Create a scale set using Instance Mix +## Create a scale set using instance mix ### [Azure portal](#tab/portal-1) 1. Go to **Virtual machine scale sets**. 2. Select the **Create** button to go to the **Create a virtual machine scale set** view. 3. In the **Basics** tab, fill out the required fields. If the field isn't called out in the next sections, you can set the fields to what works best for your scale set. -4. Ensure that you select a region that Instance Mix is supported in. +4. Ensure that you select a region that instance mix is supported in. 5. Be sure **Orchestration mode** is set to **Flexible**. 6. In the **Size** section, click **Select up to 5 sizes (preview)** and the **Select a VM size** page appears. 7. Use the size picker to select up to five VM sizes. Once you've selected your VM sizes, click the **Select** button at the bottom of the page to return to the scale set Basics tab. 8. In the **Allocation strategy (preview)** field, select your allocation strategy. 9. When using the `Prioritized` allocation strategy, the **Rank size** section appears below the Allocation strategy section. Clicking on the bottom **Rank priority** brings up the prioritization blade, where you can adjust the priority of your VM sizes. -10. You can specify other properties in subsequent tabs, or you can go to **Review + create** and select the **Create** button at the bottom of the page to start your Instance Mix scale set deployment. +10. You can specify other properties in subsequent tabs, or you can go to **Review + create** and select the **Create** button at the bottom of the page to start your instance mix scale set deployment. ### [Azure CLI](#tab/cli-1) -Before using CLI commands with Instance Mix, please be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. +Before using CLI commands with instance mix, please be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. -You can use the following basic command to create a scale set using Instance Mix using the following command, which will default to using the `lowestPrice` allocation strategy: +You can use the following basic command to create a scale set using instance mix using the following command, which will default to using the `lowestPrice` allocation strategy: ```azurecli-interactive az vmss create \ @@ -67,7 +67,7 @@ az vmss create \ ``` ### [Azure PowerShell](#tab/powershell-1) -You can use the following basic command to create a scale set using Instance Mix using the following command, which will default to using the `lowestPrice` allocation strategy: +You can use the following basic command to create a scale set using instance mix using the following command, which will default to using the `lowestPrice` allocation strategy: ```azurepowershell-interactive New-AzVmss ` @@ -90,7 +90,7 @@ New-AzVmss ` -SkuProfileAllocationStrategy "CapacityOptimized"; ``` -To create a scale set using a scale set configuration object utilizing Instance Mix, use the following command: +To create a scale set using a scale set configuration object utilizing instance mix, use the following command: ```azurepowershell-interactive $vmss = New-AzVmssConfig -Location $loc -SkuCapacity 2 -UpgradePolicyMode 'Manual' -EncryptionAtHost -SecurityType $stnd -SkuProfileVmSize @("Standard_D4s_v3", "Standard_D4s_v4") -SkuProfileAllocationStrategy "CapacityOptimized"` | Add-AzVmssNetworkInterfaceConfiguration -Name 'test' -Primary $true -IPConfiguration $ipCfg ` @@ -103,7 +103,7 @@ $vmssResult = New-AzVmss -ResourceGroupName $resourceGroupName -Name $vmssName - ``` ### [REST API](#tab/arm-1) -To deploy an Instance Mix scale set through REST API, use a `PUT` call to the scale set: +To deploy an instance mix scale set through REST API, use a `PUT` call to the scale set: ```json PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 ``` @@ -160,4 +160,4 @@ When using the `prioritized` allocation strategy, you can specify the priority r --- ## Next steps -Learn how to [update](instance-mix-update.md) your Instance Mix enabled scale set. \ No newline at end of file +Learn how to [update](instance-mix-update.md) your instance mix enabled scale set. \ No newline at end of file diff --git a/articles/virtual-machine-scale-sets/instance-mix-overview.md b/articles/virtual-machine-scale-sets/instance-mix-overview.md index 24059a4ce6..a3e481fa5c 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-overview.md +++ b/articles/virtual-machine-scale-sets/instance-mix-overview.md @@ -1,6 +1,6 @@ --- -title: Use multiple Virtual Machine sizes with Instance Mix (Preview) -description: Use multiple Virtual Machine sizes in a scale set using Instance Mix. Optimize deployments using allocation strategies. +title: Use multiple Virtual Machine sizes with instance mix (Preview) +description: Use multiple Virtual Machine sizes in a scale set using instance mix. Optimize deployments using allocation strategies. author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual @@ -9,13 +9,13 @@ ms.date: 1/10/2025 ms.reviewer: jushiman --- -# Use multiple Virtual Machine sizes with Instance Mix (Preview) +# Use multiple Virtual Machine sizes with instance Mix (Preview) > [!IMPORTANT] -> Instance Mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). +> Instance mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). -Instance Mix enables you to specify multiple different Virtual Machine (VM) sizes in your Virtual Machine Scale Set with Flexible Orchestration Mode, and an allocation strategy to further optimize your deployments. +Instance mix enables you to specify multiple different Virtual Machine (VM) sizes in your Virtual Machine Scale Set with Flexible Orchestration Mode, and an allocation strategy to further optimize your deployments. -Instance Mix is best suited for workloads that are flexible in compute requirements and can be run on various different sized VMs. Using Instance Mix you can: +Instance mix is best suited for workloads that are flexible in compute requirements and can be run on various different sized VMs. Using instance mix you can: - Deploy a heterogeneous mix of VM sizes in a single scale set. You can view max scale set instance counts in the [documentation](./virtual-machine-scale-sets-orchestration-modes.md#what-has-changed-with-flexible-orchestration-mode). - Optimize your deployments for cost or capacity through allocation strategies. - Continue to make use of scale set features, like [Spot Priority Mix](./spot-priority-mix.md) or [Upgrade Policies](./virtual-machine-scale-sets-set-upgrade-policy.md). @@ -25,23 +25,23 @@ Instance Mix is best suited for workloads that are flexible in compute requireme ### sku.name The `sku.name` property should be set to `"Mix"`. VM sizes will be defined in the `skuProfile`. ### sku.tier -The `sku.tier` property is currently an optional scale set property and should be set to `null` for Instance Mix scenarios. +The `sku.tier` property is currently an optional scale set property and should be set to `null` for instance mix scenarios. ### sku.capacity The `sku.capacity` property continues to represent the overall size of the scale set in terms of the total number of VMs. ### scaleInPolicy -The optional scale-in property isn't needed for scale set deployments using Instance Mix. During scaling in events, the scale set utilizes the allocation strategy to inform the decision on which VMs should be scaled in. For example, when you use `LowestPrice`, the scale set scales in by removing the more expensive VMs first. +The optional scale-in property isn't needed for scale set deployments using instance mix. During scaling in events, the scale set utilizes the allocation strategy to inform the decision on which VMs should be scaled in. For example, when you use `LowestPrice`, the scale set scales in by removing the more expensive VMs first. ## New scale set properties ### skuProfile -The `skuProfile` property represents the umbrella property for all properties related to Instance Mix, including VM sizes and allocation strategy. +The `skuProfile` property represents the umbrella property for all properties related to instance mix, including VM sizes and allocation strategy. ### vmSizes -The `vmSizes` property is where you specify the specific VM sizes that you're using as part of your scale set deployment with Instance Mix. +The `vmSizes` property is where you specify the specific VM sizes that you're using as part of your scale set deployment with instance mix. ### allocationStrategy -Instance Mix introduces the ability to set allocation strategies for your scale set. The `allocationStrategy` property is where you specify which allocation strategy you'd like to use for your Instance Mix scale set deployments. There are three options for allocation strategies, `lowestPrice`, `capacityOptimized`, and `Prioritized`. Allocation strategies apply to both Spot and Standard VMs. +Instance mix introduces the ability to set allocation strategies for your scale set. The `allocationStrategy` property is where you specify which allocation strategy you'd like to use for your instance mix scale set deployments. There are three options for allocation strategies, `lowestPrice`, `capacityOptimized`, and `Prioritized`. Allocation strategies apply to both Spot and Standard VMs. #### lowestPrice (default) This allocation strategy is focused on workloads where cost and cost-optimization are most important. When evaluating what VM split to use, Azure looks at the lowest priced VMs of the VM sizes specified. Azure also considers capacity as part of this allocation strategy. The scale set deploys as many of the lowest priced VMs as it can, depending on available capacity, before moving on to the next lowest priced VM size specified. `lowestPrice` is the default allocation strategy. @@ -53,13 +53,13 @@ This allocation strategy is focused on workloads where attaining capacity is the This allocation strategy allows you to specify a priority ranking to the VM sizes specified. Note: ranking is optional, but if provided, it must be within the range of the `vmSizes` list size. Ranks can be duplicated across sizes, meaning the sizes have the same priority. Ranks don't need to be in sequential order. ## Cost -Following the scale set cost model, usage of Instance Mix is free. You continue to only pay for the underlying resources, like the VM, disk, and networking. +Following the scale set cost model, usage of instance mix is free. You continue to only pay for the underlying resources, like the VM, disk, and networking. ## Limitations -- Instance Mix is only available for scale sets using Flexible Orchestration Mode. -- You must have quota for the VM sizes you're requesting with Instance Mix. -- You can specify **up to** five VM sizes with Instance Mix. -- For REST API deployments, you must have an existing virtual network inside of the resource group that you're deploying your scale set with Instance Mix in. +- Instance mix is only available for scale sets using Flexible Orchestration Mode. +- You must have quota for the VM sizes you're requesting with instance mix. +- You can specify **up to** five VM sizes with instance mix. +- For REST API deployments, you must have an existing virtual network inside of the resource group that you're deploying your scale set with instance mix in. ## Next steps -Learn how to [create a scale set using Instance Mix](instance-mix-create.md). \ No newline at end of file +Learn how to [create a scale set using instance mix](instance-mix-create.md). \ No newline at end of file diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 74165a4fbd..686e6c1f02 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -1,6 +1,6 @@ --- -title: Update a Virtual Machine Scale Set with Instance Mix -description: How to update a virtual machine scale set Instance Mix settings. +title: Update a Virtual Machine Scale Set with instance mix +description: How to update a virtual machine scale set instance mix settings. author: brittanyrowe ms.author: brittanyrowe ms.topic: conceptual @@ -9,14 +9,14 @@ ms.date: 1/10/2025 ms.reviewer: jushiman --- -# Update Instance Mix settings on an existing scale set -The article walks through how to update the Instance Mix settings on a scale set. +# Update instance mix settings on an existing scale set +The article walks through how to update the instance mix settings on a scale set. > [!IMPORTANT] -> Instance Mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change before general availability (GA). +> Instance mix for Virtual Machine Scale Sets with Flexible Orchestration Mode is currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change before general availability (GA). ## Prerequisites -Before using Instance Mix, complete feature registration for the `FlexVMScaleSetSkuProfileEnabled` feature flag using the [az feature register](/cli/azure/feature#az-feature-register) command: +Before using instance mix, complete feature registration for the `FlexVMScaleSetSkuProfileEnabled` feature flag using the [az feature register](/cli/azure/feature#az-feature-register) command: ```azurecli-interactive az feature register --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfileEnabled" @@ -28,15 +28,15 @@ It takes a few moments for the feature to register. Verify the registration stat az feature show --namespace "Microsoft.Compute" --name "FlexVMScaleSetSkuProfileEnabled" ``` -## Update the Instance Mix settings on an existing scale set -The Instance Mix settings can be updated on your scale set via CLI, PowerShell, and REST API. You can change either the virtual machine (VM) sizes or the allocation strategy, or both, in a single call. +## Update the instance mix settings on an existing scale set +The instance mix settings can be updated on your scale set via CLI, PowerShell, and REST API. You can change either the virtual machine (VM) sizes or the allocation strategy, or both, in a single call. When changing allocation strategies, the *new* allocation strategy won't become effective until the scale set scales in or out. That is to say, your existing VMs won't be altered based on the allocation strategy until there's a scaling action. When changing from `Prioritized` to another allocation strategy, you must first nullify the priority ranks associated with the VM sizes. This will be covered in more detail in the supporting code snippets. ### [Azure CLI](#tab/cli-1) -Before using CLI commands with Instance Mix, be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. +Before using CLI commands with instance mix, be sure you're using the correct CLI version. Make sure you're using version `2.66.0` or greater. #### Change the Allocation Strategy You can use the following basic command to update the allocation strategy. In this case, we're updating the scale set to use the `CapacityOptimized` allocation strategy: @@ -115,7 +115,7 @@ Update-AzVmss ` ``` ### [REST API](#tab/arm-1) -To update the Instance Mix settings through REST API, use a `PATCH` call to the scale set resource. Be sure to use an API version on or after `2023-09-01`: +To update the instance mix settings through REST API, use a `PATCH` call to the scale set resource. Be sure to use an API version on or after `2023-09-01`: ```json PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 ``` @@ -180,18 +180,18 @@ To change the VM Sizes in your deployment, you only need to change the VM Sizes ``` --- -## Update an existing scale set to use Instance Mix -Existing scale sets that don't have Instance Mix can enable Instance Mix by specifying the `skuProfile` properties in the scale set. The `skuProfile`, `vmSizes`, and `allocationStrategy` can be specified through REST API and CLI. +## Update an existing scale set to use instance mix +Existing scale sets that don't have instance mix can enable instance mix by specifying the `skuProfile` properties in the scale set. The `skuProfile`, `vmSizes`, and `allocationStrategy` can be specified through REST API and CLI. The properties that must be updated are: 1. `sku.name` must be set to `"Mix"`. 2. `sku.tier` must be set to `null`. 3. You must define the `skuProfile` properties. At least one value must be provided in `vmSizes`. An `allocationStrategy` should be set, but if a value isn't provided, Azure defaults to `lowestPrice`. -The following sections have sample code snippets to demonstrate enabling Instance Mix on existing scale sets. +The following sections have sample code snippets to demonstrate enabling instance mix on existing scale sets. ### [Azure CLI](#tab/cli-2) -In this snippet, we'll update an existing scale set using Flexible Orchestration Mode to use Instance Mix with the VM sizes D2asv4, D2sv5, and D2asv5 and allocation strategy of `capacityOptimized`. +In this snippet, we'll update an existing scale set using Flexible Orchestration Mode to use instance mix with the VM sizes D2asv4, D2sv5, and D2asv5 and allocation strategy of `capacityOptimized`. ```azurecli-interactive az vmss update \ @@ -203,7 +203,7 @@ az vmss update \ ``` ### [REST API](#tab/arm-2) -To update the Instance Mix settings through REST API, use a `PATCH` call to the scale set resource. Be sure to use an API version on or after `2023-09-01`. +To update the instance mix settings through REST API, use a `PATCH` call to the scale set resource. Be sure to use an API version on or after `2023-09-01`. ```json PUT https://management.azure.com/subscriptions/{YourSubscriptionId}/resourceGroups/{YourResourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{youScaleSetName}?api-version=2023-09-01 ``` @@ -239,4 +239,4 @@ In the body, be sure to set `sku.name` to `"Mix"` and include the `skuProfile` w ## Next steps -Learn how to [troubleshoot](instance-mix-faq-troubleshooting.md) your Instance Mix enabled scale set. \ No newline at end of file +Learn how to [troubleshoot](instance-mix-faq-troubleshooting.md) your instance mix enabled scale set. \ No newline at end of file From b5daf47fe993d8e04d7ded06405f36d98f6783aa Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:25:04 -0800 Subject: [PATCH 20/21] scaling profile update --- .../virtual-machine-scale-sets-scaling-profile.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/articles/virtual-machine-scale-sets/virtual-machine-scale-sets-scaling-profile.md b/articles/virtual-machine-scale-sets/virtual-machine-scale-sets-scaling-profile.md index 90ec7e4b44..0aac652508 100644 --- a/articles/virtual-machine-scale-sets/virtual-machine-scale-sets-scaling-profile.md +++ b/articles/virtual-machine-scale-sets/virtual-machine-scale-sets-scaling-profile.md @@ -51,8 +51,11 @@ Virtual machine scale sets in Flexible Orchestration Mode can optionally be crea Once you have created the virtual machine scale set, you can manually attach virtual machines. -> [!NOTE] -> You cannot create a virtual machine scale set without a scaling profile in the Azure portal. +### [Azure portal](#tab/portal) +1. Navigate to the **Create a Virtual Machine Scale Set (VMSS)** blade. +2. Set your resource group, scale set name, region, availability zone, and orchestration mode. +3. In the **Scaling** section, select **No scaling profile**. +4. Complete the **Advanced** and **Tags** section before selecting the **Review + create** button. ### [Azure CLI](#tab/cli) From a40ffad6bf998541391387accf3f9c6f73d8961e Mon Sep 17 00:00:00 2001 From: Brittany Rowe <75815751+brittanyrowe@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:31:07 -0800 Subject: [PATCH 21/21] Incorporating feedback --- articles/virtual-machine-scale-sets/TOC.yml | 6 ++++-- articles/virtual-machine-scale-sets/instance-mix-update.md | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/articles/virtual-machine-scale-sets/TOC.yml b/articles/virtual-machine-scale-sets/TOC.yml index 5700e756b4..38e32a2cdf 100644 --- a/articles/virtual-machine-scale-sets/TOC.yml +++ b/articles/virtual-machine-scale-sets/TOC.yml @@ -84,12 +84,14 @@ href: virtual-machine-scale-sets-mvss-guest-based-autoscale-linux.md - name: Troubleshoot autoscale href: virtual-machine-scale-sets-troubleshoot.md - - name: Instance Mix (Preview) + - name: Instance mix (Preview) items: - name: Overview href: instance-mix-overview.md - - name: Create a scale set with Instance Mix + - name: Create a scale set with instance mix href: instance-mix-create.md + - name: Update instance mix settings + href: instance-mix-update.md - name: FAQs and troubleshooting href: instance-mix-faq-troubleshooting.md - name: Scaling Profile diff --git a/articles/virtual-machine-scale-sets/instance-mix-update.md b/articles/virtual-machine-scale-sets/instance-mix-update.md index 686e6c1f02..4acea16901 100644 --- a/articles/virtual-machine-scale-sets/instance-mix-update.md +++ b/articles/virtual-machine-scale-sets/instance-mix-update.md @@ -184,9 +184,9 @@ To change the VM Sizes in your deployment, you only need to change the VM Sizes Existing scale sets that don't have instance mix can enable instance mix by specifying the `skuProfile` properties in the scale set. The `skuProfile`, `vmSizes`, and `allocationStrategy` can be specified through REST API and CLI. The properties that must be updated are: -1. `sku.name` must be set to `"Mix"`. -2. `sku.tier` must be set to `null`. -3. You must define the `skuProfile` properties. At least one value must be provided in `vmSizes`. An `allocationStrategy` should be set, but if a value isn't provided, Azure defaults to `lowestPrice`. +* `sku.name` must be set to `"Mix"`. +* `sku.tier` must be set to `null`. +* You must define the `skuProfile` properties. At least one value must be provided in `vmSizes`. An `allocationStrategy` should be set, but if a value isn't provided, Azure defaults to `lowestPrice`. The following sections have sample code snippets to demonstrate enabling instance mix on existing scale sets.