Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a8427c8
Implement new parameters and adding tests for Auto Zone Placement
audreyttt Oct 10, 2025
cd16ab3
Fix update method
audreyttt Nov 17, 2025
fa5fac2
Merge branch 'main' into audreyt/autoZonePlacement
audreyttt Nov 17, 2025
dee4887
Add ZonePlacementPolicy param to New-AzVmss
audreyttt Nov 19, 2025
7893add
Add test for New-AzVmss
audreyttt Nov 19, 2025
d3a2dce
Define PowerShell Pull Request Agent with guidelines
audreyttt Nov 20, 2025
4027c18
Rename my-agent.agent.md to ps-cmdlet.agent.md
audreyttt Nov 20, 2025
4439dd0
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 1, 2025
e7364fd
Revert "Rename my-agent.agent.md to ps-cmdlet.agent.md"
audreyttt Dec 1, 2025
94e5b2b
Revert "Define PowerShell Pull Request Agent with guidelines"
audreyttt Dec 1, 2025
79338fa
Merge branch 'main' into audreyt/autoZonePlacement
audreyttt Dec 1, 2025
7e4c455
Rename ValueMaxInstancePercentPerZone to MaxInstancePercentPerZoneValue
audreyttt Dec 1, 2025
3fa0bb7
Add IncludeZone and ExcludeZone properties
audreyttt Dec 1, 2025
3ef7128
Add IncludeZone and Exclude Zone to vmss update method and update cha…
audreyttt Dec 3, 2025
7478986
Update help docs
audreyttt Dec 3, 2025
2fef2ce
Add testing for new parameters
audreyttt Dec 4, 2025
22a973e
Merge branch 'main' of https://github.com/audreyttt/azure-powershell
audreyttt Dec 4, 2025
bd880d4
Merge branch 'main' into audreyt/autoZonePlacement
audreyttt Dec 4, 2025
23d89c3
Remove ZonePlacementPolicy, InlcudeZone, and ExcludeZone from Update …
audreyttt Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ public VirtualMachineScaleSetUpdate()
[JsonProperty(PropertyName = "zones")]
public IList<string> Zones { get; set; }

/// <summary>
/// Gets or sets the placement of a vmss. Placement section specifies
/// the user-defined constraints for virtual machine scale set hardware placement.
/// This property cannot be changed once VMSS is provisioned.
/// </summary>
[JsonProperty(PropertyName = "placement")]
public Placement Placement { get; set; }
Comment on lines +246 to +252
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on lines 247-249 states "This property cannot be changed once VMSS is provisioned" but the Placement property is being added to VirtualMachineScaleSetUpdate, which is used for updating existing VMSS. If the property truly cannot be changed after provisioning, it should not be in the Update model. If it can be changed, the comment is misleading. Please verify the Azure API behavior and either remove the property from the Update model or update the comment to accurately reflect whether this property is mutable.

Suggested change
/// <summary>
/// Gets or sets the placement of a vmss. Placement section specifies
/// the user-defined constraints for virtual machine scale set hardware placement.
/// This property cannot be changed once VMSS is provisioned.
/// </summary>
[JsonProperty(PropertyName = "placement")]
public Placement Placement { get; set; }

Copilot uses AI. Check for mistakes.

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,12 @@ public void TestVirtualMachineScaleSetResiliencyView()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetResiliencyView");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachineScaleSetAutomaticZonePlacement()
{
TestRunner.RunTestScript("Test-VirtualMachineScaleSetAutomaticZonePlacement");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6185,4 +6185,90 @@ function Test-VirtualMachineScaleSetResiliencyView
# Cleanup
Clean-ResourceGroup $rgname;
}
}

<#
.SYNOPSIS
Test Virtual Machine Scale Set Automatic Zone Placement feature
#>
function Test-VirtualMachineScaleSetAutomaticZonePlacement
{
# Setup
$rgname = Get-ComputeTestResourceName

try
{
# Common
$loc = "eastus2euap";
$vmssName = "vmssAutoZonePlacement" + $rgname;
$vmssName2 = "vmssAutoZonePlacement2" + $rgname;
$vnetName = "vnetAutoZonePlacement" + $rgname;
$subnetName = "subnetAutoZonePlacement" + $rgname;
$adminUsername = Get-ComputeTestResourceName;
$password = Get-PasswordForVM | ConvertTo-SecureString -AsPlainText -Force;
$cred = New-Object System.Management.Automation.PSCredential ($adminUsername, $password);
$linuxImage = "Canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest"
$domainNameLabel1 = "d1" + $rgname;

# Create resource group
New-AzResourceGroup -Name $rgname -Location $loc -Force


# Create using simple parameter and New-AzVmss
New-AzVmss -ResourceGroupName $rgname -Location $loc -Credential $cred -VMScaleSetName $vmssName -DomainNameLabel $domainNameLabel1 -Image $linuxImage -ZonePlacementPolicy 'Auto' -IncludeZone "1","2"

# Verify ZonePlacementPolicy successfully set
$vmss = Get-AzVmss -ResourceGroupName $rgname -VMScaleSetName $vmssName
Assert-AreEqual $vmss.Placement.ZonePlacementPolicy 'Auto'
Assert-AreEqual $vmss.Placement.IncludeZones.Count 2

# Create VNet and Subnet
$vnetAddressPrefix = "10.0.0.0/16";
$subnetAddressPrefix = "10.0.0.0/24";
$subnetConfig = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix $subnetAddressPrefix;
$vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $loc -AddressPrefix $vnetAddressPrefix -Subnet $subnetConfig;

# Get subnet object
$subnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname | Get-AzVirtualNetworkSubnetConfig -Name $subnetName

# VMSS Config
$vmssConfig = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName "Standard_D2s_v3" -ZonePlacementPolicy 'Auto' -MaxZoneCount 2 -EnableMaxInstancePercentPerZone -MaxInstancePercentPerZoneValue 50 -IncludeZone "1","2";

# Configure IP and NIC
$ipCfg = New-AzVmssIpConfig -Name "ipconfig1" -SubnetId $subnet.Id
$vmssConfig = Add-AzVmssNetworkInterfaceConfiguration -VirtualMachineScaleSet $vmssConfig `
-Name "nicConfig" -Primary $true -IPConfiguration $ipCfg;

# Configure OS profile
$vmssConfig = Set-AzVmssOSProfile -VirtualMachineScaleSet $vmssConfig `
-ComputerNamePrefix "test" `
-AdminUsername $adminUsername `
-AdminPassword $password

# Assert the Automatic Zone Placement from the vmssConfig
Assert-AreEqual $vmssConfig.Placement.ZonePlacementPolicy 'Auto';
Assert-AreEqual $vmssConfig.ResiliencyPolicy.ZoneAllocationPolicy.MaxZoneCount 2;
Assert-True { $vmssConfig.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Enabled }
Assert-AreEqual $vmssConfig.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Value 50

# Create the vmss using the config
$vmssResult = New-AzVmss -ResourceGroupName $rgname -VMScaleSetName $vmssName2 -VirtualMachineScaleSet $vmssConfig;

# Assert the Automatic Zone Placement from the vmssResult
Assert-AreEqual $vmssResult.Placement.ZonePlacementPolicy 'Auto';
Assert-AreEqual $vmssResult.ResiliencyPolicy.ZoneAllocationPolicy.MaxZoneCount 2;
Assert-True { $vmssResult.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Enabled }
Assert-AreEqual $vmssResult.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Value 50

# Update vmss
$vmssUpdate = Update-AzVmss -ResourceGroupName $rgname -Name $vmssName2 -MaxInstancePercentPerZoneValue 60;

Assert-AreEqual $vmssUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Value 60;
#>
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test function Test-VirtualMachineScaleSetAutomaticZonePlacement has a multi-line comment starting marker on line 6267 without a proper ending. The marker "#>" should be removed as it appears to be leftover from commenting out code. This will cause a syntax error in PowerShell.

Suggested change
#>

Copilot uses AI. Check for mistakes.
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
-->
## Upcoming Release
* Added new parameters `ZonePlacementPolicy`, `IncludeZone`, `ExcludeZone`, `MaxZoneCount`, `EnableMaxInstancePercentPerZone` and `MaxInstancePercentPerZoneValue` to `New-AzVmssConfig` cmdlet.
* Added new parameters `ZonePlacementPolicy`, `IncludeZone` and `ExcludeZone` to `New-AzVmss` cmdlet.
* Added new parameters `MaxZoneCount`, `EnableMaxInstancePercentPerZone` and `MaxInstancePercentPerZoneValue` to `Update-AzVmss` cmdlet.

## Version 11.1.0
* Added `-ResiliencyView` parameter to `Get-AzVmssVM` cmdlet
Expand All @@ -44,6 +47,7 @@
* Added `-InstantAccessDurationMinutes` parameter to New-AzSnapshotConfig.
* Added `SecureVMGuestStateSAS` parameter to `Grant-AzSnapshotAccess`.
* Updated SDK to use 2025-04-01 version of the ComputeRP API for Compute related cmdlets.
* Added new parameters `ZonePlacementPolicy`, `maxZoneCount`, `enableMaxInstancePercentPerZone`, and `maxInstancePercentPerZoneValue` to `New-AzVmssConfig` and `Update-AzVmss` cmdlets for VMSS Automatic Zone Placement.
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter names in the ChangeLog entry on line 50 use inconsistent casing. They use camelCase (maxZoneCount, enableMaxInstancePercentPerZone, maxInstancePercentPerZoneValue) instead of PascalCase used in the actual parameter names (MaxZoneCount, EnableMaxInstancePercentPerZone, MaxInstancePercentPerZoneValue). Parameter names in ChangeLog entries should match the actual parameter names exactly, including casing.

Suggested change
* Added new parameters `ZonePlacementPolicy`, `maxZoneCount`, `enableMaxInstancePercentPerZone`, and `maxInstancePercentPerZoneValue` to `New-AzVmssConfig` and `Update-AzVmss` cmdlets for VMSS Automatic Zone Placement.
* Added new parameters `ZonePlacementPolicy`, `MaxZoneCount`, `EnableMaxInstancePercentPerZone`, and `MaxInstancePercentPerZoneValue` to `New-AzVmssConfig` and `Update-AzVmss` cmdlets for VMSS (Virtual Machine Scale Set) Automatic Zone Placement.

Copilot uses AI. Check for mistakes.

## Version 10.3.0
* Fixed typo 'DeyAll' to 'DenyAll' in NetworkAccessPolicy description.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,7 @@ public string ResourceGroupName
public string Etag { get; private set; }

public ResiliencyPolicy ResiliencyPolicy { get; set; }

public Placement Placement { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,43 @@ public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.Reso
[PSArgumentCompleter("CreateBeforeDelete")]
public string AutomaticZoneRebalanceBehavior { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically picked by system as part of resource creation.")]
[PSArgumentCompleter("Any", "Auto")]
public string ZonePlacementPolicy { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'. If not specified, all availability zones will be used.")]
public int MaxZoneCount { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Specifies whether maxInstancePercentPerZonePolicy should be enabled on the virtual machine scale set.")]
public SwitchParameter EnableMaxInstancePercentPerZone { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Limit on the number of instances in each availability zone as a percentage of the total capacity of the virtual machine scale set. For example: if set to 50, this means that at any time, no more than 50% of the VMs in your scale set can be allocated to a single zone.")]
public int MaxInstancePercentPerZoneValue { get; set; }

[Parameter(
Mandatory = false,
HelpMessage = "This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any', availability zone selected by the system must be present in the list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones in region will be considered for selection.")]
[ValidateNotNullOrEmpty]
public string[] IncludeZone { get; set; }

[Parameter(
Mandatory = false,
HelpMessage = "This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any', availability zone selected by the system must not be present in the list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones in region will be considered for selection.")]
[ValidateNotNullOrEmpty]
public string[] ExcludeZone { get; set; }

protected override void ProcessRecord()
{
if (ShouldProcess("VirtualMachineScaleSet", "New"))
Expand Down Expand Up @@ -455,6 +492,9 @@ private void Run()
//ResiliencyPolicy
ResiliencyPolicy vResiliencyPolicy = null;

// Placement
Placement vPlacement = null;

if (this.IsParameterBound(c => c.SkuName))
{
if (vSku == null)
Expand Down Expand Up @@ -1121,6 +1161,68 @@ private void Run()
vVirtualMachineProfile.SecurityPostureReference.ExcludeExtensions = this.SecurityPostureExcludeExtension;
}

if (this.IsParameterBound(c => c.ZonePlacementPolicy))
{
if (vPlacement == null)
{
vPlacement = new Placement();
}
vPlacement.ZonePlacementPolicy = this.ZonePlacementPolicy;
}

if (this.IsParameterBound(c => c.IncludeZone))
{
if (vPlacement == null)
{
vPlacement = new Placement();
}
vPlacement.IncludeZones = this.IncludeZone;
}

if (this.IsParameterBound(c => c.ExcludeZone))
{
if (vPlacement == null)
{
vPlacement = new Placement();
}
vPlacement.ExcludeZones = this.ExcludeZone;
}

if (this.IsParameterBound(c => c.MaxZoneCount))
{
if (vResiliencyPolicy == null)
{
vResiliencyPolicy = new ResiliencyPolicy();
}
if (vResiliencyPolicy.ZoneAllocationPolicy == null)
{
vResiliencyPolicy.ZoneAllocationPolicy = new ZoneAllocationPolicy();
}
vResiliencyPolicy.ZoneAllocationPolicy.MaxZoneCount = this.MaxZoneCount;
}

if (this.EnableMaxInstancePercentPerZone.IsPresent)
{
if (vResiliencyPolicy == null)
{
vResiliencyPolicy = new ResiliencyPolicy();
}
if (vResiliencyPolicy.ZoneAllocationPolicy == null)
{
vResiliencyPolicy.ZoneAllocationPolicy = new ZoneAllocationPolicy();
}
if (vResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy == null)
{
vResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy = new MaxInstancePercentPerZonePolicy();
}
vResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Enabled = this.EnableMaxInstancePercentPerZone.IsPresent;

if (this.IsParameterBound(c => c.MaxInstancePercentPerZoneValue))
{
vResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Value = this.MaxInstancePercentPerZoneValue;
}
}

var vVirtualMachineScaleSet = new PSVirtualMachineScaleSet
{
Overprovision = this.IsParameterBound(c => c.Overprovision) ? this.Overprovision : (bool?)null,
Expand All @@ -1145,7 +1247,8 @@ private void Run()
SpotRestorePolicy = this.IsParameterBound(c => c.EnableSpotRestore) ? new SpotRestorePolicy(true, this.SpotRestoreTimeout) : null,
PriorityMixPolicy = vPriorityMixPolicy,
SkuProfile = vSkuProfile,
ResiliencyPolicy = vResiliencyPolicy
ResiliencyPolicy = vResiliencyPolicy,
Placement = vPlacement
};

WriteObject(vVirtualMachineScaleSet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,24 @@ public override void ExecuteCmdlet()
[PSArgumentCompleter("CreateBeforeDelete")]
public string AutomaticZoneRebalanceBehavior { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'. If not specified, all availability zones will be used.")]
public int MaxZoneCount { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Specifies whether maxInstancePercentPerZonePolicy should be enabled on the virtual machine scale set.")]
public bool EnableMaxInstancePercentPerZone { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Limit on the number of instances in each availability zone as a percentage of the total capacity of the virtual machine scale set. For example: if set to 50, this means that at any time, no more than 50% of the VMs in your scale set can be allocated to a single zone.")]
public int MaxInstancePercentPerZoneValue { get; set; }

private void BuildPatchObject()
{
if (this.IsParameterBound(c => c.AutomaticOSUpgrade))
Expand Down Expand Up @@ -1511,6 +1529,48 @@ void InitializeAutomaticZoneRebalancingPolicy()
InitializeAutomaticZoneRebalancingPolicy();
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.AutomaticZoneRebalancingPolicy.RebalanceBehavior = this.AutomaticZoneRebalanceBehavior;
}

void InitializeZoneAllocationPolicy()
{
if (this.VirtualMachineScaleSetUpdate == null)
{
this.VirtualMachineScaleSetUpdate = new VirtualMachineScaleSetUpdate();
}
if (this.VirtualMachineScaleSetUpdate.ResiliencyPolicy == null)
{
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy = new ResiliencyPolicy();
}
if (this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy == null)
{
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy = new ZoneAllocationPolicy();
}
}

if (this.IsParameterBound(c => c.MaxZoneCount))
{
InitializeZoneAllocationPolicy();
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxZoneCount = this.MaxZoneCount;
}

if (this.IsParameterBound(c => c.EnableMaxInstancePercentPerZone))
{
InitializeZoneAllocationPolicy();
if (this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy == null)
{
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy = new MaxInstancePercentPerZonePolicy();
}
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Enabled = this.EnableMaxInstancePercentPerZone;
}

if (this.IsParameterBound(c => c.MaxInstancePercentPerZoneValue))
{
InitializeZoneAllocationPolicy();
if (this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy == null)
{
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy = new MaxInstancePercentPerZonePolicy();
}
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Value = this.MaxInstancePercentPerZoneValue;
}
}

private void BuildPutObject()
Expand Down Expand Up @@ -2364,6 +2424,44 @@ void InitializeAutomaticZoneRebalancingPolicy()
InitializeAutomaticZoneRebalancingPolicy();
this.VirtualMachineScaleSetUpdate.ResiliencyPolicy.AutomaticZoneRebalancingPolicy.RebalanceBehavior = this.AutomaticZoneRebalanceBehavior;
}

void InitializeZoneAllocationPolicy()
{
if (this.VirtualMachineScaleSet.ResiliencyPolicy == null)
{
this.VirtualMachineScaleSet.ResiliencyPolicy = new ResiliencyPolicy();
}
if (this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy == null)
{
this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy = new ZoneAllocationPolicy();
}
}

if (this.IsParameterBound(c => c.MaxZoneCount))
{
InitializeZoneAllocationPolicy();
this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxZoneCount = this.MaxZoneCount;
}

if (this.IsParameterBound(c => c.EnableMaxInstancePercentPerZone))
{
InitializeZoneAllocationPolicy();
if (this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy == null)
{
this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy = new MaxInstancePercentPerZonePolicy();
}
this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Enabled = this.EnableMaxInstancePercentPerZone;
}

if (this.IsParameterBound(c => c.MaxInstancePercentPerZoneValue))
{
InitializeZoneAllocationPolicy();
if (this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy == null)
{
this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy = new MaxInstancePercentPerZonePolicy();
}
this.VirtualMachineScaleSet.ResiliencyPolicy.ZoneAllocationPolicy.MaxInstancePercentPerZonePolicy.Value = this.MaxInstancePercentPerZoneValue;
}
}
}
}
Loading
Loading