Azure / Azure/azure-powershell

ZonePlacementPolicy not enforced at VM creation

Open
#27,855 7 comments 0 reactions 0 assignees View on GitHub
act-observability-squad bug Compute customer-reported Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### Description

The documentation states that the -ZonePlacementPolicy Any parameter should trigger the Azure-selected availability zone feature the same way it is selected in the portal. however, using this parameter has no effect and the VM gets created without an availability zone.
repro with v10.0.0 of the Az.Compute module

### Issue script & Debug output

```PowerShell
no output since the command is running fine
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 5.1.26100.4061
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.4061
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

### Module versions

```PowerShell
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 5.0.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault...}
Script 10.0.0 Az.Compute {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-AzVMDataDisk...}
```

### Error output

```PowerShell
no error output
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing VM creation with Az.Compute 10.0.0 and the -ZonePlacementPolicy Any parameter, comparing the result with portal-created VMs. Trace how this parameter is handled during VM creation; done means it causes Azure to select an availability zone as documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.