Skip to content

Commit

Permalink
Merge pull request #830 from MicrosoftDocs/main
Browse files Browse the repository at this point in the history
1/10/2025 PM Publish
  • Loading branch information
Taojunshen authored Jan 10, 2025
2 parents eaae3ef + ce79f30 commit 2e1f03a
Show file tree
Hide file tree
Showing 5 changed files with 290 additions and 45 deletions.
8 changes: 5 additions & 3 deletions articles/virtual-machine-scale-sets/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@
- name: Autoscale using guest metrics
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)
href: virtual-machine-scale-sets-troubleshoot.md
- 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
Expand Down
34 changes: 18 additions & 16 deletions articles/virtual-machine-scale-sets/instance-mix-create.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
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
ms.service: azure-virtual-machine-scale-sets
ms.date: 11/18/2024
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"
Expand All @@ -28,21 +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)
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:
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
az vmss create \
Expand All @@ -64,8 +66,8 @@ az vmss create \
--skuprofile-allocation-strategy 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:
### [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
New-AzVmss `
Expand All @@ -88,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 `
Expand All @@ -101,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 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
```
Expand Down Expand Up @@ -158,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.
Learn how to [update](instance-mix-update.md) your instance mix enabled scale set.
44 changes: 20 additions & 24 deletions articles/virtual-machine-scale-sets/instance-mix-overview.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
---
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
ms.service: azure-virtual-machine-scale-sets
ms.date: 11/18/2024
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), [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
### 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.
Expand All @@ -53,17 +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 currently available in the following regions: West US, West US2, East US, and East US2.
- 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.
- 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.
## 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.

## Next steps
Learn how to [create a scale set using Instance Mix](instance-mix-create.md).
Learn how to [create a scale set using instance mix](instance-mix-create.md).
Loading

0 comments on commit 2e1f03a

Please sign in to comment.